News for hackers. Stuff that matters.
Re:How can C Programs be so Reliable? by mattgreenrocks on Thursday September 22, 2011 @08:40AM (#3025834)
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.
Re:How can C Programs be so Reliable? by praptak on Thursday September 22, 2011 @09:13AM (#3025922)
"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/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. */
Re:How can C Programs be so Reliable? by epo on Friday September 23, 2011 @05:21AM (#3029361)
And a comment written by a 13-year old proves what exactly?
Re:How can C Programs be so Reliable? by adobriyan on Thursday September 22, 2011 @09:25AM (#3025971)
But first function returning multiple values. Baby steps. :-)