Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: NULL as a string terminator Message-ID: <26122@mimsy.umd.edu> Date: 22 Aug 90 11:38:17 GMT References: <24141@megaron.cs.arizona.edu> <134@blekko.UUCP> <1881@jura.tcom.stc.co.uk> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 41 >In article <3585@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) recommends against `#define'ing error strings and recommends instead, e.g., reading them from a file: >>For why? Internationalisation, _that's_ for why. In article <1881@jura.tcom.stc.co.uk> rmj@tcom.stc.co.uk (Rhodri James) writes: >I cringe when I see this (unwords like "internationalisation", I mean). Well, I am not particularly enamoured of polysyllabic neologisms applied epideictically myself. :-) But I evagate: >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? Efficient? Probably so---but we are talking about an error handler here. (`My code handles 100,000 errors per second! Of course it only handles 10 non-errors per second....') Simpler to maintain? Perhaps. More legible? Not really; maybe even not at all: >I know which I would rather do of running pre-preprocessing or just >compiling with "-DFRENCH". I do not understand why these are listed as the alternatives (what `running pre-processing'?). But given modern networks and systems, it is not only possible, it is even likely that the same machine will be used simultaneously from Japan, the USA, France, and Germany, and the same utility (a single binary compiled in the UK) may have to produce the same error message in four different languages, all at the same time, with one of them in a 16-bit character set. This is rather difficult to accomodate cleanly in the source--- particularly if one is called upon to add a new language every day (for a week or two, then every few days, and eventually only one a year or so). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris