Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: String lengths Message-ID: <13122@steinmetz.ge.com> Date: 13 Feb 89 14:51:17 GMT References: <8876@alice.UUCP> <532@rpi.edu> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 22 In article <532@rpi.edu> jefu@pawl.rpi.edu (Jeffrey Putnam) writes: | I like the C model for strings. I like it mostly for its simplicity | and ease of use. It may well be that a representation for strings | that includes string length as a part of a structure is better for | efficiency, or more modular or whatever. But! the model used is | simple and introduces no magic into the language. | | Magic? Yup. Magic is what happens when the language (or operating system | or hardware) does something odd that is not reachable by the user. This | includes magic strings, magic arrays (arrays stored in the same way - that | is with extra information hidden from the user), magic library calls (like | some VMS calls) and so on. Getting things into implementation dependent structures (or typedefs) is hardly a new idea. No portable program ever cares what's in a FILE for instance, since there are a lot of non-UNIX implementations around. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me