Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: union initialization Message-ID: <4577@utzoo.UUCP> Date: Sat, 3-Nov-84 19:18:29 EST Article-I.D.: utzoo.4577 Posted: Sat Nov 3 19:18:29 1984 Date-Received: Sat, 3-Nov-84 19:18:29 EST References: <529@wjh12.UUCP>, <5700025@ea.UUCP> Organization: U of Toronto Zoology Lines: 21 > 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