Subj : Re: Software Job Market Myths To : comp.programming,comp.software-eng From : Chris Sonnack Date : Wed Aug 17 2005 07:47 pm Richard Heathfield writes: >>> curious as to whether you can find the /other/ robustness >>> problem that I was describing here. >> >> It might prove impossible to derefernce s1 or s2 without >> catching a SEGV. > > Curiosity satisfied. Thank you. Because they might be NULL? Isn't this one of those religious issues? I recall going several painful rounds with Dan Pop over this one. He was adament that the function should fault--as (IIRC) the usual C lib functions do. I was (and very much am) of the opinion that no low-level routine of *mine* will allow a fault, if at all possible (some of my stuff helps run manufacturing production lines, and a software crash is not viewed kindly). My logic is, gimme a NULL, getta NULL back--you deal with it (tho, in some cases, such as a "strlen() substitute", I'd treat a NULL as a "" and return 0). (Good discussion--I missed this one. There's actually SIX things wrong with the example, not five! Thanks, guys.) -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| .