Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: