Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!ima!ISM780B!jim From: jim@ISM780B.UUCP Newsgroups: net.lang.c Subject: Re: Standard for union initialization? Message-ID: <140@ISM780B.UUCP> Date: Sat, 2-Feb-85 01:38:52 EST Article-I.D.: ISM780B.140 Posted: Sat Feb 2 01:38:52 1985 Date-Received: Sun, 3-Feb-85 09:04:48 EST Lines: 18 Nf-ID: #R:brl-tgr:-764700:ISM780B:25500101:000:999 Nf-From: ISM780B!jim Jan 31 19:46:00 1985 >"Intelligent idea"??? This is just another accident waiting to happen! >This looks ok for a nice short example like this, but frequently, the >union's definition and initialization are far apart (and maybe in different >source files). This makes it easy to add another union element, and >inadvertantly screw up the initializers royally without as much as a >peep from the compiler. I don't disagree with your observation, but please note that the same argument can be applied to structure initialization. The reason that it is a nice idea is that it is isomorphic to structure initialization, so it fits the existing structure; it doesn't involve any new mechanism, so it fits within the committee's conservative charter. Arguing that C's method of structure initialization is dangerous is a totally different discussion; come up with better ideas for structure initialization, and you will have come up with better ideas for union initialization. -- Jim Balter, INTERACTIVE Systems (ima!jim)