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

Why would one pick C or C++ over Rust for this project?


Much easier to build, for me at least.

I tried installing Rust and building the example, but then it complained about nightly features, and I didn't have time to figure that out.

C/C++ are mainstream languages, and building is as simple as g++ test.cpp.


Using nightly features is as simple as inserting +nightly as the first argument to rustc or cargo (assuming rust was installed with rustup, which is the default way to install it).

So in this case, it's just `rustc +nightly green_threads.rs`


If the point is to explain how green threads work, it is better to use a common language so people can simply try to understand the concept and not try to understand both the concept and the language at the same time.




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

Search: