2 ms·
> If you don’t need to understand/inspect the details of a HashMap implementation then you are not doing ‘systems programming’. The attitude that ‘someone has d
by echelon 7y ago
> If you don’t need to understand/inspect the details of a HashMap implementation then you are not doing ‘systems programming’. The attitude that ‘someone has done it for me’ and therefore I don’t care about it is not a characteristic of ‘systems programming’.
Don't gatekeep. Rolling your own containers has no bearing on whether or not the language is a systems programming language.
I'm using it to do real time audio and graphics, but I don't have the time to hand roll my own data structures because I have a demanding day job and other responsibilities. I still get to have the benefit of using a fast, modern, bare metal language.
> Saying Rust is simpler than C because you can use a pre-written HashMap implementation is ridiculous
No it's not. HashMap is literally there in std::collections to import and use. You don't need to find a library, know about the linker, etc.
Rust makes working in this domain so much easier than C and C++. You can go from zero to productive in a reasonable amount of time.
- adev_ 7y ago> Rust makes working in this domain so much easier than C and C++ C++ has a hash map in its standard Library since 10 years. > You can go from zero to productive in a reasonable amount of time. That's definitively a very WRONG assumption. Anyone starting to use Rust, even with 10 years of C++ experience, will spend from HOURS to DAYS fighting the borrow checker. It is not "zero to productive", Rust is not easy to learn, nor productive for beginner. Is it however worth the effort ? I believe it is. Especially if you are looking for a language providing you safety first.
- echelon 7y ago> C++ has a hash map in its standard Library since 10 years. OP was talking about C, not C++/STL. > Anyone starting to use Rust, even with 10 years of C++ experience, will spend from HOURS to DAYS fighting the borrow checker. You might have learned Rust pre-1.0 or non lexical lifetimes. They've made a tremendous amount of work to improve the language and make it beginner friendly. A few weeks ago I watched one of my coworkers implement a simple toy state machine app after having just read a tutorial. The compiler literally hand holds you now. The meme that Rust is hard needs to die.
- adev_ 7y ago> You might have learned Rust pre-1.0 or non lexical lifetimes. They've made a tremendous amount of work to improve the language and make it beginner friendly. I still use Rust almost every week for personal projects, I enjoy it and I still would not qualify it as quick "zero to productive". It still fall behind C++ in term of productivity for me. Many things that few lines of C++ allow you to do in few lines requires mental gymnastic to wrap around the borrow checker, strict typing and Rust error report system in 10-20 lines. Comparatively speaking, I program in C++ since 15 years and in Rust since 3 years. Still, everything I do in rust takes between 1.5X to 3X more times to do than in C++, even if the tooling is better. I know I am going to make enemies saying that with the number of Rust fanboys on YC, but... this is my experience. And it is not a surprising experience.... Anyone that programmed in OCaml or strict typing language like ATS already experienced that... The strict typing gives you runtime safety and make your program "just" run (less bug-prone) compared to Weaker typed language.... But... it has a cost... like everything... And the cost is much more mental gymnastic... meaning time... meaning less productivity.