strncpy

Bill Poser poser at csli.Stanford.EDU
Sat Dec 23 12:18:37 AEST 1989


Jerry Schwartz suggests that my question about why strncpy does not
null terminate was ill-formulated because I didn't say what sort of
answer I was looking for. I disagree. Sometimes only one kind of answer
is appropriate. For example, if you're designing a language the only
kind of answer you are interested in is rationale, so you can decide if
the comparable construct in your own language should work that way.
But if you want to know why a feature of a language is the way it is,
then the nature of the explanation is open. It may be that there is
an explicit rationale or it may be that there is no particular rationale
for doing it that way and that the reason is purely historical. But
you don't know in advance.



More information about the Comp.lang.c mailing list