K
Keith Thompson
jacob navia said:How many times in this group we are left with interpreting the
obscure wordings of the C standard?
Not to speak about the buffer overflow error in the C standard
in the code of the asctime() function. Not to speak about functions
described in the library that will never be able to have correct
behavior unless they are lucky: YES gets() is in the C standard.
The C standard is an important document, but it is nowhere
near what we could call a coherent formal system, and I do not
think that that was the intent anyway.
What do asctime() and gets() have to do with the question of
whether C is a formal system? You dislike them, fine, so do I.
But asctime() in particular is perhaps the *most* formally defined
entity in the entire standard, since it's required to behave in a
manner consistent with a specific C implementation.
The behavior of a call to asctime() or gets() is undefined in
certain cases. Are you suggesting that a formal system can have
no instances of undefined behavior? (I'm not all that familiar with
formal systems; if that's part of the definition, then there's little
hope for defining *any* real-world language as a formal system.)
The circumstances in which the behavior of a call to asctime() is
undefined can be unambiguously determined by reading its description
in the standard, and two sufficiently careful independent readers
will reach exactly the same conclusion about what those cases are.
That's formal enough for me. Sure, asctime() has its problems,
but a lack of formality isn't one of them.