4 ms·
Traits, generics, lifetimes, macros and endless, and incomprehensible backtraces when using Futures already makes it more complex. Rust is difficult to read an
by jedisct1 6y ago
Traits, generics, lifetimes, macros and endless, and incomprehensible backtraces when using Futures already makes it more complex.
Rust is difficult to read and maintain, due to the common use of abstractions over abstractions over abstractions. Just looking at a structure, it’s already hard to understand what functions are available (hidden in traits, themselves behaving different according to cargo features…). And of course, it also has things such as operator overloading, and hidden heap memory allocations, so there’s a lot of hidden control flow happening.
It’s also even slower than C++ to compile, especially when using macros. And it doesn’t have static analysis too as C++ does. Both of these also contribute to “complexity” as in “how much effort it takes to write an application”.
- roca 6y agoThe fact that Rust has traits and generics doesn't make it more complex than C++, because they substitute for C++ features that are even more complex (classes, virtual methods, templates, concepts). I believe C++ is far more complex because, having programmed in C++ for 30 years and hanging out with other developers with similar levels of experience, I still trip over weird C++ features that I never knew existed. My latest example: Argument Dependent Lookup, which means f(a) and (f)(a) can wind up calling completely different functions. How many C++ developers know that? In my experience, Rust has fewer complexities like that.