4 ms·
No, but C could use more consistent error handling semantics, rather than conflating return values and error codes. Worse still: a combination of a return code
by mattgreenrocks 15y ago
No, but C could use more consistent error handling semantics, rather than conflating return values and error codes. Worse still: a combination of a return code and a global error code.
- praptak 15y ago"Worse still: a combination of a return code and a global error code." That's not the worst that exists in C :-) Let me quote a dietlibc developer from http://www.koders.com/c/fid1639C203A2255EB1FA11DC6A68D74FEB2B530F8F.aspx#L14 http://www.koders.com/c/fid1639C203A2255EB1FA11DC6A68D74FEB2... /* Oh boy, this interface sucks so badly, there are no words for it. * Not one, not two, but _three_ error signalling methods! (*h_errnop * nonzero? return value nonzero? *RESULT zero?) The glibc goons * really outdid themselves with this one. */
- epo 15y agoAnd a comment written by a 13-year old proves what exactly?
- adobriyan 15y agoBut first function returning multiple values. Baby steps. :-)