Comment

Comment by nicbn

If you aren't using OOP features (such as inheritance), you're not really doing OOP, despite using C++.

In the case of C++ I'd put something like: you can use free or costly abstractions, and OOP in general has a preference towards costly ones.

Also vector is a weird point to make, it's been some time I had to deal with Java (luckily) but arrays there are also linear AFAIK. And there are GCs that have a bump allocator for new objects (not sure if Java fits here), so cache would benefit more than in sparse malloc allocations in C/C++.

parent nicbn 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton