Re: FAQ 1.12--auto keyword
- From: mwojcik@xxxxxxxxxxx (Michael Wojcik)
- Date: 10 Apr 2006 21:14:40 GMT
In article <443a146b.410693812@xxxxxxxxxxxxxx>, rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos) writes:
"Bill Pursell" <bill.pursell@xxxxxxxxx> wrote:
The faq (question 1.12) states that the keyword "auto" is completely
useless.
However, it is necessary to forward declare a nested function (for
gcc...I'm not sure if this is gcc specific or a language issue.)
There is no such thing as a nested function in ISO C.
If gcc allows nested functions, that's its business. However, if it
requires "auto" to forwardly declare them, this is broken. They should
have chosen "static".
That's debatable. I think "auto" is more appropriate, since it
suggests the additional work necessary to provide the called nested
function with a link to the enclosing function's closure (using a
static chain or display or what have you) as part of its environment.
That, to me, is a more significant feature of nested functions than
their limited scope, which I imagine is what would justify yet
another application of "static".
Though to be honest I think reusing any of the existing keywords was
a bad idea; if they want to invent a new language, they should invent
a new language.
--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx
You brung in them two expert birdwatchers ... sayin' it was to keep us from
makin' dern fools of ourselfs ... whereas it's the inherent right of all to
make dern fools of theirselfs ... it ain't a right held by you official types
alone. -- Walt Kelly
.
- Follow-Ups:
- Re: FAQ 1.12--auto keyword
- From: Richard Bos
- Re: FAQ 1.12--auto keyword
- References:
- FAQ 1.12--auto keyword
- From: Bill Pursell
- Re: FAQ 1.12--auto keyword
- From: Richard Bos
- FAQ 1.12--auto keyword
- Prev by Date: Re: VERY URGENT C PROGRAM
- Next by Date: Re: How to read strings from a file with comments
- Previous by thread: Re: FAQ 1.12--auto keyword
- Next by thread: Re: FAQ 1.12--auto keyword
- Index(es):
Relevant Pages
|