Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Why are character arrays special (equal rights for structs) Message-ID: <1989Feb8.223302.27123@utzoo.uucp> Organization: U of Toronto Zoology References: <19742@uflorida.cis.ufl.EDU> Date: Wed, 8 Feb 89 22:33:02 GMT In article <19742@uflorida.cis.ufl.EDU> thoth@beach.cis.ufl.edu () writes: >... The question is, what does the standard say about >structure and array constants (and arrays of structure >constants, etc.)? Absolutely nothing. The idea was, as I understand it, proposed a number of times, unsuccessfully. >I think that to not have the capability >to declare something like that on the fly is crippled. Alas, we'll just have to go on using our crippled language (in which many millions of lines of code have been written quite successfully). >If >it isn't in the standard, somebody get it in there. If it >IS in the standard, somebody get GNU to add it to their >compiler... You have things in the wrong order: ANSI standards committees are in the business of standardizing ideas that have already been tried out and found to be workable. (There are a number of things in ANSI C that were never tried in *Unix* C compilers, but very few things that haven't been tried somewhere by somebody in some C compiler.) Designing a language -- or even a single language feature -- is tricky, and feedback from real use of real implementations is important. The alternative, having a standards committee get the bit between its teeth and design something out of thin air, tends to yield most unpleasant results. (X3J11's one major foray in that direction was the disastrous "noalias", fortunately since deleted.) I think such a thing already exists in the GNU compiler, actually, and if experience with it is sufficiently positive, it might perhaps end up in the next revision of the standard. It's much too late now to mess with the about-to-be-issued current version. -- Allegedly heard aboard Mir: "A | Henry Spencer at U of Toronto Zoology toast to comrade Van Allen!!" | uunet!attcan!utzoo!henry henry@zoo.toronto.edu