Re:Why I should have written ZeroMQ in C, not C++ (2012)
by chacham15 on Thursday August 15, 2013 @04:46PM
(#6220483)
I mostly agree, but there are some exceptions. The principal one is function overloading. This makes code soooo much more readable and easy to use. So, basically, I compile my C code with g++ just for function overloading (which technically makes it not C code, but w/e).
[ Parent
| on HN ]
Re:Why I should have written ZeroMQ in C, not C++ (2012)
by Someone on Thursday August 15, 2013 @05:56PM
(#6220850)
In C11, Type-generic expressions give you something that looks just like overloading (http://www.robertgamble.net/2012/01/c11-generic-selections.h...)
The declarations do not look nice (I don't think that is a matter of taste in this case, compared to overloading in C++), but for the principled who want to use C or for those who have to use C, there is a solution.