8 ms·
After years of dynamically typed / interpreted languages, I decided I wanted to learn a statically typed language and so I to set out to trial both Go and Rust
by giantandroids 5y ago
After years of dynamically typed / interpreted languages, I decided I wanted to learn a statically typed language and so I to set out to trial both Go and Rust. Rust was a painful experience. I kept trying to pass around simple types and constantly hit compiler failures.
I then set up Go and got started. Fell in love with it, I was immediately 10x more productive then I was with rust. I also found reading other people's code far more easier as well, where rust would have all this (for me) difficult syntax.
I want to like rust, but I honestly don't think I am smart enough.
- deleted 5y ago[deleted]
- lalaithion 5y agoComing from dynamically typed high level languages, you're learning two things at the same time when you're learning rust: 1) Low level programming 2) Typed programming Both of which are difficult. I would suggest learning one of Haskell or Scala and one of C or C++ first, and then trying Rust again.
- giantandroids 5y agoAs I said, I am getting on great with go now.
- stouset 5y agoRust is sometimes a painful experience because it forces you to deal upfront with an important concept other languages play fast and loose with. You can absolutely get productive more quickly in other languages as a result. But to me, developers who take the time to get over that hurdle by and large become dramatically more productive in the long run, and that’s before you take into account the fact that their code will have near-optimal performance and be virtually bulletproof. There’s a reason we’re regularly seeing best-in-class general purpose tools and libraries coming out of the Rust ecosystem.
- atoav 5y agoThe thing for me was: I realized the type system is not something to fight with, but something that you can utilize to always have certain guarantuees about what is going on, which can make it extremely easy to reason about code especially after your program reaches a certain size. But to profit from this you have to reach a level where you are beyond fighting with the ownership model and with data types. For small/quick scripting stuff I still go to python, because some problems can just be solved faster with it. I don't think there is anything wrong with that. It really depends on the scale of programs and the needed reliability IMO.
- giantandroids 5y agoThanks, I don't know that I am fighting it, its more that I just can't figure it out. Maybe I need to try again. I read the rust book last time, but large parts of it went over my head.