logoalt Hacker News

kevin_thibedeauyesterday at 6:58 PM2 repliesview on HN

C arrays are better than this mess. All the problems caused by the intervening generic programming abstraction machinery disappear.


Replies

compiler-guyyesterday at 7:38 PM

The nice thing about C++ is that if you want to use plain old C arrays, you can. And there will be no extra overhead over plain C.

You will lose many nice features like fancy strings and easy array resizing (which may or may not be acceptable to you), but you don’t have to pay for it if you don’t use it. (Mostly)

This does seem pretty complicated. And I doubt I will ever use it. But for some the trade off is worth it, and they get to make the choice.

SuperV1234yesterday at 7:49 PM

Didn't know you could use C arrays to get static compile time reflection, guess C was really ahead of its time!

show 1 reply