4 ms·
Complexity is relative. Go is a language for high-level application development. It has a runtime, garbage collection, and a sophisticated M:N threading schedu
by jmillikin 4y ago
Complexity is relative.
Go is a language for high-level application development. It has a runtime, garbage collection, and a sophisticated M:N threading scheduler that are all designed to help the programmer express themselves in terms of the problem domain. It competes with Java, C#, and (in some cases) Python or Ruby.
Rust is a language for low-level systems programming. It needs far more complexity than Go because the programmer might need to make extremely specific guarantees about performance or memory layout. It competes with C++ and C.
Is Rust a more complex language than C++? It's not obvious to me that this is true when you add in the third-party tooling (linters, static analysis) required to provide Rust's correctness properties in a C++ codebase.
Is Rust a more complex language than Go or Java? Sure. Obviously. Anyone who says it's not is lying or foolish. But that's not the comparison being made.
- 1letterunixname 4y agoThe issue with Go is it's a "worse is better" situation: it's easy to go from 0 to a limited amount of productivity, but then it peaks because of the impractical and unreasonable design limitations due to absurd governance decisions. It's too minimal and too limited in key ways out of design purity. Rust's syntax and verbosity sometimes leaves much to be desired or the convoluted syntax and structures to get interior mutability, but it doesn't matter because of its immense power in the spirits of say ML, Haskell, or C#. Rust can do a lot of what they do and a lot more, and safer. Pony and Idris are barely used but have features Rust doesn't have. I think too many people poo-poo Rust because they either don't want to understand it or can't grasp its concepts like lifetimes (liveness) or move. It's easy to dismiss what one doesn't understand and stake a claim with an irrational, tribal ego opinion rather than consider the alternatives in the programming toolbox for a given purpose.
- CactusOnFire 4y agoFar from an expert in Go or Rust, but I think the use-case for Go is you need to do something very by-the-numbers and you want it to be easy to maintain and performant. Once you start reaching for more off-the-shelf solutions, you hit diminishing returns with it as a language.
- carlmr 4y ago>they either don't want to understand it or can't grasp its concepts like lifetimes (liveness) or move. I think it's funny/sad when I hear C++ programmers complain about this. If you don't understand lifetimes in Rust, you don't understand lifetimes in C++ either. Rust however will prevent you making a mistake. That makes it less complex for you. If you can't get your program to compile in Rust, you might get it to compile in C++, but you shouldn't.