All of the above seems to have a downside too1) The memory safety stuff is pretty confusing. Move and copy both use the equality operator, but you're not always able to use it depending on the type. I think a separate move operator would clear up some of the confusion. I also didn't really get a good handle on how borrowing and lifetimes worked, but it seemed in need of a simpler explanation. 2) The plethora of options for smart pointers and reference counting 2) No prefix operators like ++a. Perhaps a consequence of immutability.
I'm not really familiar with Go, Nim, or Crystal, but I spent
some time learning about Rust yesterday. I thought it was pretty
interesting. In particular,
1) The GC is optional (memory safety is enforced by the type
system and #2).
2) Smart pointers with separate operators and support for
reference counting.
3) Immutability by default. Someone (somewhere) made an
interesting point that it can be conceptually convenient to have
the most restrictive choice as the default. I'm not sure I agree
with that (maybe the most common choice used in good code), but
at least immutability by default it can be helpful for concurrent
programming.
- Re: Asked ... Laeeth Isharc via Digitalmars-d
- Re: Asked on R... Nick Sabalausky via Digitalmars-d
- Re: Asked on Reddit: Which of R... weaselcat via Digitalmars-d
- Re: Asked on Reddit: Which ... Dennis Ritchie via Digitalmars-d
- Re: Asked on Reddit: Wh... Dennis Ritchie via Digitalmars-d
- Re: Asked on Reddit: Which ... Jonathan M Davis via Digitalmars-d
- Re: Asked on Reddit: Which ... Paulo Pinto via Digitalmars-d
- Re: Asked on Reddit: Wh... weaselcat via Digitalmars-d
- Re: Asked on Reddit... Paulo Pinto via Digitalmars-d
- Re: Asked on Reddit: Which of Rust, ... Andrei Alexandrescu via Digitalmars-d
- Re: Asked on Reddit: Which of Rust, ... jmh530 via Digitalmars-d
- Re: Asked on Reddit: Which of R... Dave via Digitalmars-d
- Re: Asked on Reddit: Which ... Idan Arye via Digitalmars-d
- Re: Asked on Reddit: Wh... Dave via Digitalmars-d
- Re: Asked on Reddit... Idan Arye via Digitalmars-d
- Re: Asked on R... Dave via Digitalmars-d
- Re: Asked ... Idan Arye via Digitalmars-d
- Re: Asked ... Dave via Digitalmars-d
- Re: Asked ... Dave via Digitalmars-d
- Re: Asked ... Walter Bright via Digitalmars-d
- Re: Asked ... Idan Arye via Digitalmars-d