3 ms·
This is an old myth thats no longer fully true. Rust is a language that straddles both high level and low level in the sense that it is literally indistinguisha
by Herval_freire 3y ago
This is an old myth thats no longer fully true. Rust is a language that straddles both high level and low level in the sense that it is literally indistinguishable. You can use rust as if it were a high level language without knowing anything about low level stuff. The binary you get at the end, ends up being low level in the sense that it's performant as if it was written in a low level language.
There is definitely a mental overhead with rust but this has nothing to do with low level or high level concepts. The borrow checker is actually a high level feature that exists for safety, not performance.
- rapsey 3y agoAsync Rust compared to Erlang's process model is worlds apart.
- brabel 3y ago> You can use rust as if it were a high level language without knowing anything about low level stuff. How can you write that with a (I suppose) straight face? Rust makes you think about lifetime of every single variable, as anyone who's written a couple of lines of Rust knows... it' not just the lifetime annotations you will need when you get past the "copy everything" phase and start using or writing data structures, but the borrow checker making even the simplest stuff something you actually have to think through carefully (do you need to pass a reference, make a copy, use a mutable variation of some function, open a new block to limit the scope of the variable, assign it to a local variable to avoid it getting out of scope too early?). This is plainly "low level" stuff you need to worry about all the time which you just don't in any high level language.
- rapsey 3y agoYou are both exaggerating
- Herval_freire 3y agoThese are high level safety features that replace another sibling high level construct: The garbage collector. It's a different style of programming but still high level. Make no mistake the abstractions are high level but the cost is zero, hence the term zero cost abstraction and the association with "low level."