2 ms·
I think that C would have lasted us much longer if it just had C++-style templates. No classes, exceptions or other C++ features needed.
by kzrdude 9y ago
I think that C would have lasted us much longer if it just had C++-style templates. No classes, exceptions or other C++ features needed.
- Retra 9y agoCan't macros already do everything templates can? I mean, it would be nicer to have templates, but I don't see why that would be a bottleneck for anything. Someone could probably write a templating macro and you could use that to the same effect.
- kzrdude 9y agoI've seen that many times, written a few of them, and it's pretty horrible. Real templates are needed for such basics as generic data structures.
- oconnor663 9y agoI think the other critical feature you need is destructors, before you can build really helpful containers.