4 ms·
Simplicity is not that simple :) Brainfuck is an objectively smaller and simpler language than C, but it's not any better. Certain problems have an inherent ir
by pornel 5y ago
Simplicity is not that simple :) Brainfuck is an objectively smaller and simpler language than C, but it's not any better.
Certain problems have an inherent irreducible complexity. This complexity has to go somewhere. If the language doesn't tackle it, then users of the language will have to.
This is especially clear in the case of memory errors in C. C is too basic to express ownership of memory, valid scopes of pointers, and thread-safety of their usage. This doesn't make these problems disappear, only requires users to handle it manually and get it right without compiler's help.
In Rust you have to specify ownership and thread-safety of everything. It is complex, but not because Rust is complex, but because safe low-level memory management and thread safety are difficult problems.
- raxxorrax 5y agoNot that difficult problems most of the time, but in practice the problems are more or less ignored and it often works, in most cases anyway. Not good obviously. Problem I have with Rust is that it uses certain patterns to make it work against the unforgiving borrow checker. I am not convinced that we will stay at this point. Rust disallows some operations where the developer can know the operation to be safe, but the borrow checker does not. So you need to accommodate the language.
- pornel 5y agoYes indeed, in Rust you have to do things the Rust way. But that's not much different than pains of trying to write imperative code in an OOP language, or mutable code in a pure functional language. Rust is closer to ML than the C family of languages, and the differences become apparent if you try to use it like C/C++. It's not a blocker in practice, because you can fudge things with `unsafe` if you know you're smarter than the borrow checker.
- raxxorrax 5y agoTrue, it just reminds me of declaring every Java method with "throws Exception".