Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c Subject: Re: Carrying around excess baggage. Message-ID: <1642@mcgill-vision.UUCP> Date: 16 Sep 89 03:21:34 GMT References: <1418@atanasoff.cs.iastate.edu> <1989Sep5.224525.634@utzoo.uucp> Organization: McGill University, Montreal Lines: 37 In article <1989Sep5.224525.634@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > In article <1418@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu (John Hascall) writes: >> All the (proposed) ANSI C standard seems to have done is made every >> quirky little implementation "official"... > You obviously weren't around for the Reiserism Wars, when a good many > people rose in outrage because X3J11 disallowed some undocumented, > ugly, poorly-thought-out "features" of the Reiser C preprocessor > (used in most Unix C compilers). ...and replaced them with ugly, poorly-thought-out features. At least the new ones are documented. I suppose this is progress. Why do I say ugly and poorly thought out? It's inextensible and confusing, when it would have been so *easy* to do it in a nice extensible, unconfusing, and no more incompatible[$] manner! #define paste(foo,bar) foo ## bar /* what the dpANS says[%] */ #define paste(foo,bar) foo #paste bar /* what I would recommend */ #define stringize(foo) # foo /* what the dpANS says[%] */ #define stringize(foo) #string foo /* what I would recommend */ [$] Unless the compiler I mention in the next paragraph exists. [%] I may have the dpANS # and ## interchanged. See next paragraph. Clean. Easy to keep straight which is which. Easy to extend when you want to do something else strange with macro arguments. Was something like this proposed? (Surely.) Why was it turned down? Was there - gack! - some compiler that already used # and ## (aka "prior art")? Ah well, at least it's better than what we had. Now everyone will use the *same* ugly features. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu