Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: A bad design decision early on in ANSI C. Message-ID: <1322@sugar.UUCP> Date: 27 Dec 87 21:14:04 GMT Organization: Sugar Land UNIX - Houston, TX Lines: 21 Summary: Bitten by a design flaw. I would like to suggest removing a "feature" from 'C'. Structure assignment/passing. Unless you're going to go all the way and allow structures to be fully first class objects (and presumably provide a way to overload operators so you can do this meaningfully), it just adds confusion. It doesn't add any functionality to the language over passing pointers and copying data. Usually I do that anyway, since I know malloc() won't blow out my stack. The worst effect, passing a structure instead of a pointer (or vice versa) can be dealt with by function prototyping... but in the meanwhile there are compilers out there that implement structure passing but not function prototyping. A simple typo (leaving out an &) can ruin your whole day. I still get bitten by this bug every now and then. At least compiler designers should provide a switch to turn it off. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.