union initialization
Henry Spencer
henry at utzoo.UUCP
Sun Nov 4 10:18:29 AEST 1984
> Was one of the alternatives [for union initialization] something similar
> to the ALGOLW "record constant" facility? In C, this would translate to:
>
> (struct gezornin) {"a", 10, 2.3, 'x'}
>
> being considered a constant. ...
>
> In other words, add a facility to allow structure constants (useful in *lots*
> of places), and then require all union initializations to have an explicit
> cast.
I would imagine this was looked at. One obvious problem with structure
constants is that there is no C implementation experience with them, so
we cannot be confident that we understand their implications and problems.
Remember, ANSI committees are not in the business of inventing new ideas,
but of cleaning up and standardizing well-proven ideas. This is a feature,
not a bug; we do NOT want the ANSI C committee to start inventing a new
language. Some would argue that the current drafts are already borderline.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list