logoalt Hacker News

Narishma • today at 6:48 AM • 2 replies • view on HN

One place where it's definitely worse than C++ is memory usage.


Replies

marginalia_nu • today at 11:07 AM

Regardless whether you're coding in C++ or Java, this sort of code needs to use scratch allocators or pooled objects everywhere that matters. Both languages have some nominal support for this via e.g. std::pmr and SegmentAllocator but I wouldn't stretch as far to say either feels idiomatic.

pjmlp • today at 7:53 AM

Depends in the C++ skills, and how the code looks like, from "C with a C++ compiler" up to "worthwhile of a CppCon talk".