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

That greatly depends on use case.

I think if you're looking to write a simple HTTP server with some API functions that talk to some RDBMS at less than 100 requests per second, yeah, C++ is pretty hygienic and safe these days.

If you need to play around with memory management strategies like non-default allocators then yeah, the knives are still very sharp and will cut you if you're not careful. This comes up a lot when writing C++ extensions for scripting languages like PHP, Python, etc and you have to interact with objects managed outside of your C++ code.



> C++ is pretty hygienic and safe these days.

C++ these days still supports all the syntax and programming style of C++ in the 70s. You probably mean "you can program in a hygienic and safe way in C++", which is true, but also is not necessarily a feature of the language but of the programmer (just a few years ago I interacted with some theoretically senior C++ programmers who claimed mixing raw pointers with smart pointers is fine because they're senior and know what they're doing).


> C++ is pretty hygienic and safe these days.

Ask developers to safely define a string constant that is accessible outside of that translation unit. Now do it without C++17, which many companies aren't using yet.

Things have gotten a lot better, but even these incredibly basic needs can be really tricky.




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

Search: