Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Re: ANSI C idea: structure literals (and short constants) Message-ID: <1988Mar6.033210.1309@utzoo.uucp> Organization: U of Toronto Zoology References: <2743@mmintl.UUCP>, <2550052@hpisod2.HP.COM> Date: Sun, 6 Mar 88 03:32:10 GMT > Aggregate constants are needed for data abstraction. I guess I'm simple-minded; you'll have to explain in more detail. I use data abstraction routinely and have never *needed* aggregate constants. I also find it difficult to envision a situation in which it would be impossible to write static const struct thingie xxx = { ... }; ... foo = xxx; instead of foo = { ... }; It is agreed that the latter form is more convenient. But we were talking about *needs*, in the context of an existing language, not about a wishlist for a new language. > The problem of deciding what their type is solved for now (and possibly > always) by stating in the standard that such syntax has no inherent type > and must be cast or assigned to the desired type. [expletive deleted] Speaking as a user and an implementor, this is an abortion if there ever was one. If one *must* add aggregate constants to the language -- preferably as an experimental variant and not as part of the effort to STANDARDIZE THE CURRENT LANGUAGE, DAMMIT! -- then the right way to do it is probably the GNU compiler's approach, which avoids this hideous botch entirely. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry