by apitman · 1y ago · 0 comments
That's an interesting take. I feel like all three of these languages fit into pretty discrete lanes that the others don't. Python for quick hacking or scientific stuff, Go for web services and self-contained programs, Rust for portability (specifically sharing code as C ABI or WASM) and safety.
> It’s not hard to learn
I agree Rust is easy to learn. I've done it 4 or 5 times now.
No joke, is true.
When I see Rust first time I agree to everything, agree is the way, is correct and is nice (it hurt me a lot that have used around 10+ langs before professionally, and I come just right from F# so need so little to be converted!).
And obviously that is how I should have done the stuff if the other langs have the proper features!
Then, I need to actually program correctly and bam! Is so hard!
I need to relearn it many times. And yes, the hard part is to stop doing all the things that I have done in all the other langs implicitly.
BTW, the hard part with Rust is that a)It syntax is too familiar and b) Is a totally different programming model. Until it not get the second part and truly pay attention to `moves, borrow, share, lock, clone, copy` instead of `loops, iter, conditional, read, write, etc` then is very hard to progress.
This is somewhat of a stretch: dyn Traits in Rust are sort of like compile time duck typing. OTOH, interfaces in Go and virtual functions in C++ are the same thing.
(Though you can emulate them with unsafe in Rust, like anyhow)
Also, type system is very nice, probably one of the best amongst non-functional programming languages. Overloading, generics, type inference, distinct type aliases, first-class functions, subranges, etc. etc.
I've seen Go have praise over not supporting OOP. Nim got some of it too =D. No classes, only structs and functions. In fact every operator is a function and you can overload them for custom types. OOP is still possible, but it's harder to make inheritance monster with factory factory factories.
Nim gives you power, just remember that with power comes responsibility.
This is my pitch for Nim language.
https://www.lurklurk.org/effective-rust/ could be for you; while it starts from the very basics—for a person that knows how to program—it does seem to cover a lot and in a structured manner.
I expect one to learn something new at least something by page 70 :).