4 ms·
The argument for Rust is rarely that C++ cannot do the same task, it's that Rust provides better guardrails. Unreadable code is not a C++ specific problem, but
by ZephyrBlu 4y ago
The argument for Rust is rarely that C++ cannot do the same task, it's that Rust provides better guardrails.
Unreadable code is not a C++ specific problem, but does Rust make it easier to write readable code? Probably. Same for memory leaks and other similar problems.
- sidlls 4y agoNon-trivial Rust code can be just as unreadable as code one would write in any other language. In fact, some of Rust's features (e.g. lifetime identifiers, functional-ish constructs that people use to create huge call chains with closures everywhere) arguably make it easier to write unreadable code than one might find in other languages.
- deleted 4y ago[deleted]
- smolder 4y agoSome features do both: make it easier to write elegant code, while also making it easier to write unreadable code. Introducing such features is a trade-off and I think they generally choose wisely.
- blub 4y agoAs another commenter said: lifetime identifiers and functional constructs. To which I’ll add reference overuse. The C++ programmers that love over-complicated, read-only code would be right at home in Rust. In fact they’re probably working on it right now :-)