Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond From: diamond@diamond.csl.sony.junet (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: strings Message-ID: <10259@socslgw.csl.sony.JUNET> Date: 17 May 89 05:23:36 GMT References: <10250@socslgw.csl.sony.JUNET> <10263@smoke.BRL.MIL> Sender: news@csl.sony.JUNET Reply-To: diamond@csl.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 34 Doug Gwyn: >>>If you want counted strings, C makes it relatively easy to provide >>>them for yourself. me: >>Good luck porting other people's strictly conforming programs though. >>They might use C strings. >>Good luck persuading someone else to port your programs. Doug Gwyn: >I don't understand your comment. Of course the C compiler and library >continue to support null-terminated strings. Defining your own >counted-string data type and functions doesn't affect that at all. >Furthermore there is no reason your counted-string implementation >should be other than perfectly portable. Yes, just like the C compiler continues to support { and }, but you can do: #define BEGIN { #define END } or (sorry Bjarne but it's true) #define Case break; case and still be perfectly portable. Everyone will hate you. A lot of C programmers, such as for example Doug Gwyn, expect standard facilities to be used. -- Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp@relay.cs.net) The above opinions are my own. | Why are programmers criticized for If they're also your opinions, | re-implementing the wheel, when car you're infringing my copyright. | manufacturers are praised for it?