Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz (Boyd Roberts) Newsgroups: comp.std.c Subject: Re: Macro sustitution inside quotes Message-ID: <1284@necisa.ho.necisa.oz> Date: 10 Apr 90 01:43:04 GMT References: <636@mahendo.Jpl.Nasa.Gov> <1281@necisa.ho.necisa.oz> <12534@smoke.BRL.MIL> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 59 In article <12534@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > >Twisted? It is about as straightforward as anything else about C. I >find string catenation very handy in cases where the source code is >highly indented or the string is particularly long. If I need a long string, I'll use a long string. String concatenation and the # operator just isn't keeping with the style of the language. The # operators are particularily revolting: #define string(s) # s It is not obvious or intuitive what kind of expansion occurs. Whereas: #define string(s) "s" evaluates in the way you would expect. Apart from that, # operators break things. Why weren't the Reiser conventions just formalised? Oh no, that would be too easy. There is no basis in the language for string concatenation. It is at odds with the lexical and syntactic structure of the language. With operators: a _op_ b Not: a b for some defined operation. Function calls: f(a, b) Not: f(a b) Initialisation: int a[2] = { 1, 2 }; Not: int a[2] = { 1 2 }; Etc etc. The preprocessor and language weren't broken. But they got `fixed' anyway. Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''