7 ms·
One human needs to figure out how to write a line of code once, and then that line needs to be read and understood by humans over and over. Optimize for readab
by krupan 4y ago
One human needs to figure out how to write a line of code once, and then that line needs to be read and understood by humans over and over.
Optimize for readability. Rust doesn't seem to do this.
- ModernMech 4y agoIt's hard to optimize for readability, performance, and safety. Rust chose to go with performance and safety. In the future, maybe we can have a language that gives all three but not today.
- eternalban 4y agoSame thing that happened with type declarations will need to happen to semantic intent: inference.
- verdagon 4y agoShameless relevant plug: that's the exact goal of Vale! [0] It turns out, when one removes the borrow checker, they get something that's much more readable, because a lot of Rust's complexity was added to help support the borrow checker. Ironically, we can then add back in a different, easier form of borrow checking to get the speed benefits. [0] https://vale.dev/ https://vale.dev/
- vrfvr 4y ago> Rust is also very difficult. It's as complex as C++, and throws it all at the programmer at once. I thin Rust isnt nearly as complex
- IshKebab 4y agoIt definitely is. You've probably just had more time to discover the complexity of C++ (and read about it, since it's actually specified). Of course Rust's complexity is much less dangerous because if you forget some obscure rules you get a compile error instead of UB (in safe Rust at least).
- IshKebab 4y agoVale sounds very promising (I'm also closely following Koka). But one thing I've found is that Rust's ownership/borrowing model does more than just eliminate GC. It also seems to encourage good program structure that is less prone to logic bugs. I don't have solid evidence for that - more of a feeling. But I wonder if switching to reference counting would lose that. Anyway, just an observation.
- NoGravitas 4y agoVale looks exciting. Thanks for the link.
- quirino 4y agoIt's refreshing to see such a simple, good-looking and informative website. Also incredibly fast! Please keep it that way.
- estebank 4y agoReadability seems to mean different things to different people. You (and many others!) seem to interpret that word as "there's only relevant information and nothing else in sight". Personally I interpret it as "I have all the relevant information available to me in a way I can scan for quickly". Rust has a higher syntactic load, there are more things present to the reader, but it also means that everything the reader might need is always available, and the syntactical patterns are unique enough that it is "easy" (we can argue this point forever) to skip things you don't care about. When I look at type signatures, sometimes I care about the trait bounds, sometimes I don't. Sometimes I care about the lifetime relationship between different arguments and the output, sometimes I don't. Languages that make these relationships completely implicit make it easy to focus on some aspects of the code's behavior, while obscuring others.
- hgomersall 4y agoYou've repeated this in several comments. I seem to have a completely different experience to you because I find it extremely easy to read and understand rust. For sure, some constructs are tricky, like heavily generic iterators or something, but that's not rust so much as the concept that's tricky.