News for hackers. Stuff that matters.
Re:Function overloading in C by dllthomas on Sunday July 26, 2015 @06:29PM (#9952416)
It is computationally more powerful, sure. If that's what you'd intended to be talking about, then fine. But that is a distinct notion from "you are able to do more with it" - which is typically the more relevant bit when discussing the power of a feature in a programming language outside a restricted academic context.

(Incidentally, other things being equal - including ability to get done the thing you want to get done - "Turing complete" is a bug, not a feature!)

Expanding a little - "Turing complete" means that your system is capable of computing anything that can be computed in some encoding, but that doesn't mean that it is linked to the rest of the world in a way that will do something useful with that encoding of the result.

Token-manipulating C macros, while obviously of less powerful in the sense of computability, can do things that templates cannot do (name mangling, annotations, compiler pragmas) - and with _Generic, any of these can now be type directed. Of course, with great power comes the responsibility never to use half of that... but that's pretty true of C++ as well :p

There are no comments on this comment yet.