Request for Comments: Aggregate Assignment in C ...
Steven Ryan
smryan at garth.UUCP
Thu Dec 20 06:04:39 AEST 1990
>my_vec.a = 4; my_vec.c = 7; /* etc. */
>
>We submit that a better way of doing this would be to allow a . . .
>
>my_vec = {4,, 7};
As I live and breathe--structure displays again, and after only 22 years.
Two points to consider:
(1) Can you handle single element structures? When Ada tried, they really
screwed it up, even though a quick perusal of Algol 68 would have
pointed this out early in the game.
(2) The mode of of structure display cannot be synthesised: given the
types of the elements, you cannot generally determine the structure.
In Algol a structure display can only occur in strong position. (A
not-so-quick perusal of Algol will point out the dangers here.)
And for Ritchie's sake [*], don't screw up this ripof--err--borrowing the
same way +:= was screwed up to =+.
__________________________________________________
* I apologise to those who are offended by taking
the Lord's name in vain, bit I do get a teensy bit
irritated some times.
--
...!uunet!ingr!apd!smryan Steven Ryan
...!{apple|pyramid}!garth!smryan 2400 Geng Road, Palo Alto, CA
More information about the Comp.lang.c
mailing list