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

IMO the reason C++ isn't a general purpose programming language is due to memory management. Many many many applications can be built without having to worry about the garbage collector and the productivity gains of using a GC language is so so worth it. And I know you can force C++ into acting like a GC language, but why go through the effort? C++ is a precision tool for building complex and performant systems and that is nothing to be ashamed of, but it is not something you would use for web api's, or a quick script, or UI's or any quick and dirty project. I also feel like the rust community is forcing the language into places where it shouldn't really be. But yeah - people can argue about what general purpose means to them, just my 2c.


GC is not required for memory safety. The proper use of GC nowadays is for dealing with problems that inherently involve spaghetti-like reference graphs for which no other memory management strategy is suitable. Using it as mere convenience might be okay for quick prototyping, but it ultimately leads to half-baked, hard-to-refactor code requiring a lot of CPU and memory overhead at runtime.


> GC is not required for memory safety.

>memory overhead at runtime.

These statements are true. The rest is grandstanding.


> but it is not something you would use for web api's, or a quick script, or UI's or any quick and dirty project

Maybe not, but that's a function of available/standard/free libraries rather than the language itself.

Personally I do use C++ for quick and dirty projects, but OTOH I've spent the last 10 years building libraries that make that convenient.




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

Search: