Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!uunet!mcsun!ukc!stl!stc!rmj From: rmj@tcom.stc.co.uk (Rhodri James) Newsgroups: comp.lang.c Subject: Re: NULL as a string terminator Message-ID: <1881@jura.tcom.stc.co.uk> Date: 21 Aug 90 14:08:22 GMT References: <24141@megaron.cs.arizona.edu> <134@blekko.UUCP> <1990Aug20.000227.12867@icc.com> <3585@goanna.cs.rmit.oz.au> Reply-To: rmj@htc2.UUCP (Rhodri James) Organization: STC Telecomms, Harlow Technical Centre, Harlow Lines: 38 In article <3585@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: }In article <1990Aug20.000227.12867@icc.com>, cbp@icc.com (Chris Preston) writes: }(quoting a quote) }> >#define FOO_BAR_ERROR "foo bar error" }> >#define UNDEF_BAZ_ERR "undef baz err" }> > }> >I cringe when I come across code like this. Needlessly removing objects }> >a level is distracting and gains nothing. } }and then defends this, where there are conditional definitions. }> #if MSDOS }> #define DATACOM_NOT_INIT "Execute datacomm.exe and restart the program" }> #elif SYSV [etc] }as an example of a Good Thing. I cringe when I see code like this too. }For why? Internationalisation, _that's_ for why. I cringe when I see this (unwords like "internationalisation", I mean). I take it that by that you mean converting strings in code to foreign languages ("an act of making something international", as if it did any such thing). Also I fail to see your point. Surely such #ifdef switching as above is more efficient, simpler to maintain and more legible than the scrabbling about with resource files you prefer? I know which I would rather do of running pre-preprocessing or just compiling with "-DFRENCH". }> It also impacts on the reusability of code. Pay me now or pay me later. } }Considering the large negative impact on internationalisation of having }fixed strings in the program, may we _bill_ him, I wonder? Demonstrate to me a negative impact on internationalisation (ugh) and I might believe you. Any negative impact will do, I'm not too choosy. -- * Windsinger * "Nothing is forgotten..." * rmj@islay.tcom.stc.co.uk * Mike Whitaker * or (occasionally) * "...except sometimes the words" * rmj10@phx.cam.ac.uk * Phil Allcock