Comment

Comment by AshleysBrain

I always get bashed for saying I like C++, but I genuinely don't get how C programmers manage without code like this:

    std::map<std::string, std::vector<std::string>> foo;
One line and you've set up a nontrivial data structure with automatic memory management. No macro horrors (which are a diabolical way of implementing what C++ templates do well).

Since you can code like C in C++, I'm not sure why more people don't use C-with-templates as a programming style.

parent AshleysBrain 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton