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

I had a stint as a C++14 programmer, and I switched over to C++20 for this project.

You covered the downsides pretty well, big upsides for C++:

- ability to use C libraries directly - and thus original C API docs. I've got battlescars from NPMs deep dependency trees, and cargo is a similar story.

- I don't need the (very patient and knowledgeable!) people on rust discord to hold my hand every day. There's a stackoverflow for almost every C++ issue.

- that 5% edge case where the codes safe but the borrow checker isn't happy I can just write. No RefCell or nightly compiler.



Of course you will also write the 5% edge case where you've wrongly convinced yourself that it's fine. In general the sort of self-discipline that would likely ensure this doesn't happen also satisfies the borrow checker which might be why some people find this not a problem and others really struggle. Worth somebody studying perhaps.


I think that's a big philosophical difference I have with the rust culture - static analysis is a tool, not a religion. Useful, but nowhere near enough by itself to make reliable software.


> ability to use C libraries directly - and thus original C API docs. I've got battlescars from NPMs deep dependency trees, and cargo is a similar story.

This is something Rust is relatively good at, you just may need some unsafe blocks, but assuming you can compile using clang for the C code everything tends to work well. I am saying this as a Rust skeptic.




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

Search: