Haters gonna hate but the truth is that it transpire everywhere in the design of Rust that it was designed mostly by programmers prone to ivory tower/purity thinking over pragmatism, as a consequence the language is one of those with the highest cognitive load/overhead and for the <i>wrong reasons</i>.
Rust is in many aspects a major progress over C++ (a goal actually quite trivial to achieve, in restrospect). The concept of zero cost abstractions are nice marketing, except when they're not.
Rust has some design constraints in order to maximize performance like C++.
However, because of the collaborative and pure thinking nature of the project, many non-needed for performance choice have been made, to the down of cognitive load and therefore the net result being a loss of programmer joy and intelligence (since cognitive resources are a limited budget).
I am aware that rust has reached a point of religion on HN so feel free to censor my sound arguments.<p>Examples:
* Immutable by default with a verbose syntax (let mut..), compare this with Kotlin val to var. It appear clear that rewritability has not been well thought, if thought at all.
This basically means writing variables is a pain, your thinking process is <i>constantly</i> stopped by making things no longer.. constants.<p>Options. yeah null is so <i>impure</i>. Except you now have done the worst thing you could have ever done to a language, wrapped types... The unergonomy and verbosity is strong. When you see Typescript, Kotlin, C# and Dart non nullable types and smart casts you clearly realize Rust has made a permanent historical accident here. If you don't know what I'm referring, it only cost one google search.<p>Results, same problem as options. Verbose, thought interrupting. The cognitive noise of polluting return types is strong, very potent. If they wanted pure thinking nazism they could have added optionally or not, exceptions on the type signature, like java checked exceptions, or the incoming exception signatures in typescript.
The number of rust error handling libraries is a testimony to this failure. When such core features are lacking, a language is a failure.<p>Throwing away object oriented programming is the cringiest mistake of rust though. Because it's not cool enough in 2022. Rustc was first designed in Ocaml, with all the cognitive biases this imply. If composition is that nice well make it a proper pattern like Kotlin delegation, except rust did not. And even if delegation was ergonomic, inheritance still is the most sensible approach both in terms of semantics (yes not everything is a has, hypernyms matters) and in terms of features. OOP allow encapsulation which is essential, better code reuse
, visibility control, contracts and overriding. Rust do not have constructors so the method to instanciate a resource is conventional..
All of that because people have seen too much memes on twitter about Java factorySingletonDank which are indeed non-representative about reasonable code in the wild.
see also concrete examples:
<a href="https://medium.com/hackernoon/why-im-dropping-rust-fd1c32986c88#.iwj1b2bi8" rel="nofollow">https://medium.com/hackernoon/why-im-dropping-rust-fd1c32986...</a><p>bonuses:
String types hell<p>no named parameters in 2022, do they fail to realize denoting and accessing semantics is the most important thing in programming? That means in many context, rust code is much less understandable.<p>no unified async runtime..<p>There are other omissions, such as no overloading, this post is non-exhaustive.<p>That you disagree or not with some or all of my quantifiers is a thing but you have at least to agree that there is a real market for a better C++ that would be non-hipster and pragmatic with a goal of maximizing code clarity and the developper cognitive bandwith while retaining runtime performance. That better C++ would be C#/Kotlin-like but leverage LLVM and have no-GC.<p>A testimony from a previously rust fanboy that has following rustc development since its pre-1.0.<p>Edit yes flagging me is a good sign validating the belief of HN being an effective echo chamber that force-align allowed thoughts and beliefs and amplify them.