On 30/10/11 4:19 PM, Fred Cisin wrote:
On Sun, 30 Oct 2011, Toby Thain wrote:
C is standardised, so it's straightforward to
teach standard C. But you
This must be a different meaning of standardized than I was previously
familiar with. Or perhaps it meets with George Morrow's definition of
standards, in that everyone can have a unique one of their own.
If it is possible to write ANSI* C, then it is possible to teach ANSI C.
K&R explicitly leaves many choices, such as number
of bits in each
variable type, up to the compiler author, and defends it as permitting
creating whatever would be best for the hardware platform.
That doesn't mean portable C can't be written (or taught).
--T
* insert favourite C standard.
"Standard Library", by the way, is NOT
"standardized library". It is
"standard" as opposed to "optional equipment". Just as each
individual
car model can have different "standard equipment", each compiler can have
enormous latitude in "standard library". Although some functions such as
printf() had better be included if the compiler author expects to survive,
there are many functions whose definitions are subject to interpretation.
For example, does puts() add a newline ('\n')? Many implementation
choices, rather than be codified or standardized are left open, and are
now often referred to as "undefined". Not "undefined" as in x/0 ,
but
"undefined" as in what does n=2; A[n++] = n++; do?
A "standard" is "a ten foot pole with a flag on top".
--
Grumpy Ol' Fred cisin at
xenosoft.com