Hacker News new | past | comments | ask | show | jobs | submit login

Lifetimes are indeed unique, but hardly take up much syntactical space.

? operator is fine, especially if you’re used to JS or C#, and hardly take up much space.

Pointer types are what, & and * ? Fine if you’re coming from c, c++ and don’t take up much space.

.async is the weirdest for sure, but again hardly strange or disgusting.

What about any of this is worse than if I smashed my face into my keyboard but hit only the $*%#•¥$><~.,!=&@£.?!’ characters, aka writing Perl? Or anything as totally alien as Haskell?

Most Rust I read or write, if I squint, looks like Python with a few extra braces and semicolons.




I was thinking of things like Box, Rc, Arc, Cell, Refcell. Then there is also the macro language, which integrates Scheme concepts. Like C++, it is a huge language, with extra wrinkles for every new corner case. Again, maybe this all is unavoidable if one wants to have zero cost abstractions. Hopefully, language designers will learn from Rust and come up with something more elegant.

No disagreement about Perl's ugliness..


All of the types you mentioned are library constructs, not syntax.

Macros are syntax though.


I might have mis-interpreted this statement: "Certain types and traits that exist in the standard library are known to the Rust compiler." (https://doc.rust-lang.org/reference/special-types-and-traits...")


Out of those, Box is the only one that is, and the way that it is is not syntax: it has one exception, and that’s that you can move the contents out of it via a dereference. That’s making existing syntax semantically valid, not introducing new syntax.

In terms of syntax, you create a box with Box::new just like you might any other struct.

EDIT: anyway I'm not saying that means that your underlying issue isn't real, just that I think describing it as "syntax" makes the issue confusing to understand. It sounds to me like maybe you think Rust programs are too verbose?


Lifetimes aren’t even unique: they come from ocaml, where they’re used for generic types. Lifetimes are also generic types in Rust.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: