I wouldn't agree with the above procedure. Leaving strings, it's like when picking a value considered as None or NULL (no result, consider a ADC function: either return a analog value, either no results because couldn't perform ADC for instance). Say, when a function returns 0 this means there's no result. But does this mean 0 means "no results" for any function ? Of cource not (analog value could actually 0).
That's the same for strings: does NULL char means end of string ? Not necessarily, it depends on the context. And as Joep says, picking a value within [0,255] as termination char is moving the issue (ADC values can go from 0 to 255). And using escape char waste one more byte... You can't try to create generic library wheil saying "if someone insist they can create their own procedures" :) particularly when, currently, there's a way to deal with both ways. Are you actually trying to refactor both functions ? (that's different than mixing NULL and not NULL terminated chars) Oh dear, I shouldn't have opened the NULL strings pandora box :) Cheers, Seb 2011/6/1 mattschinkel <[email protected]> > > But being devil's advocate, I could use strings containing NULL char, but > > this doesn't mean end of string. > > True, if someone insists, they can make their own procedures. I don't > think we need to worry about this. This is only for consistency in our > libraries. Of course, the other option is to use two characters like > "\x". > > So, do you agree with the above procedure? > > Matt. > > -- Sébastien Lelong -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
