Re: Learning C with Older books ?.
From: Alwyn (alwyn_at_blueyonder.co.uk)
Date: 11/29/04
- Next message: Anand Hariharan: "Re: Floating Point Precision guidance."
- Previous message: Alwyn: "Re: A little disappointed"
- In reply to: Francis Glassborow: "Re: Learning C with Older books ?."
- Next in thread: Dan Pop: "Re: Learning C with Older books ?."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 19:56:10 GMT
On Mon, 29 Nov 2004 18:22:02 +0000, Francis Glassborow wrote:
> In article <pan.2004.11.29.15.49.23.676626@blueyonder.co.uk>, Alwyn
> <alwyn@blueyonder.co.uk> writes
>>If you're talking about the first edition again, then maybe, just maybe,
>>since the definition of the language was necessarily somewhat fluid then.
>>But if you're talking about the edition with 'ANSI C' stamped in red on
>>the cover, then I am uncomprehending. I thought Kernighan and Ritchie had
>>always been *the* standard text on C.
>
> No, I am talking about both editions. K&R is and has always been the
> book for those who can already program and understand Unix environments.
> AFAICR neither edition ever mentions lint and I do not know of a single
> competent C programmer who does not use some tool to check inter
> translation unit compatibility.
It has been pointed out to you more than once that K&R does refer to
'lint', at least in the first edition. Unfortunately, I cannot find my
own copy (2nd ed.) at the moment to check for myself, but if the remit was
to describe ANSI C, I don't see why they should be required to mention it.
Far be it from me to blow my own trumpet, but I can see no reason not to
be considered a competent C programmer, yet I have never had any dealings
with 'lint' and its ilk. As I understand it, it flags 'errors' like
writing 'printf("something");' instead of '(void)printf("something");',
which arguably makes for obfuscation.
'lint' was designed to compensate for the type-weakness of pre-standard C.
I've really no idea to what extent it has kept up with subsequent
developments in the language. The current crop of standard C compilers do
a decent job, in my opinion, though few attempt cross-translation-unit
type checking, owing, no doubt, to time constraints.
> A whole bundle of errors perpetrated by the curret generation of C
> programmers just do not happen when lint or something similar is used.
I entirely agree on the desirability of type-checking across compilation
units. My guess is that such a requirement was omitted from the C standard
mainly because it would have had a deleterious effect on compilation
times. It is really the compiler's job; no additional tool should be
required. Maybe in future, C compilers will do just that.
Alwyn
- Next message: Anand Hariharan: "Re: Floating Point Precision guidance."
- Previous message: Alwyn: "Re: A little disappointed"
- In reply to: Francis Glassborow: "Re: Learning C with Older books ?."
- Next in thread: Dan Pop: "Re: Learning C with Older books ?."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|