3 ms·
Unsophisticated engineering solutions are not always the best. Modern CPUs are monstrously complex, for example. Modern airliners are incredibly complex. Simple
by MaxBarraclough 6y ago
Unsophisticated engineering solutions are not always the best. Modern CPUs are monstrously complex, for example. Modern airliners are incredibly complex. Simple solutions would be woefully uncompetitive.
In the domain of programming languages, minimalistic low-level languages like assembly, C, and Forth, tend to be unsafe. They enable categories of serious bugs that never occur in safe languages. Modern garbage collectors, for example, are very complex and very valuable.
One of the reasons Safe Rust is so compelling is that it seems to succeed in offering safety, C-like performance, and good developer ergonomics. Prior to Safe Rust you had to pick two: C and C++ lack safety, Java/C# lack performance, and formal methods are hard to use (at least in the current state of the art).
Safe Rust is not a simple language. It's not possible to achieve what Safe Rust does without sophistication far beyond that of C.
- skohan 6y ago> Modern CPUs are monstrously complex, for example. But not all of that complexity is good. For example, things like branch-prediction vulnerabilities exist as a result of that complexity, which makes it extremely difficult to reason about the entire system and predict which interacting systems might lead to security issues. And it looks as if some of the complexity of the x86_64 instruction set is a liability with respect to performance compared to "simpler" instruction sets like ARM. Also with regard to Rust, the more that I write, the more that I wonder if some of that complexity is due to unsolved design problems in the core of the language. For instance, once you start introducing data structures with references inside, this starts to introduce all kinds of complexity, which baloons when these kinds of types start interacting with other systems like async. I am not expert enough to know what the solution would be, or to know if these types of problems really could be avoided, but Rust sometimes feels like a language which is missing that one key piece which would keep all of this complexity under control.
- MaxBarraclough 6y ago> And it looks as if some of the complexity of the x86_64 instruction set is a liability with respect to performance compared to "simpler" instruction sets like ARM. I don't think any of the issues with Intel's x86-64 chips are due to the instruction-set, they're due to the chips' internal architectures. ARM CPUs are by no means 'safe by nature'. > the more that I write, the more that I wonder if some of that complexity is due to unsolved design problems in the core of the language > Rust sometimes feels like a language which is missing that one key piece which would keep all of this complexity under control. I'm reminded of a quote [0] from Bjarne Stroustrup, creator of C++: > Within C++, there is a much smaller and cleaner language struggling to get out. [0] https://en.wikiquote.org/wiki/Bjarne_Stroustrup https://en.wikiquote.org/wiki/Bjarne_Stroustrup
- 0xdeaddeaf 6y agoI'd call Mars Rovers, especially the one recently sent, pretty "complex" or "modern". All of its software is C. So I'll simply call bullshit on anyone telling me "it's not possible to achieve what Safe Rust does" in C.