Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!imagine!pawl22.pawl.rpi.edu!jefu From: jefu@pawl22.pawl.rpi.edu (Jeffrey Putnam) Newsgroups: comp.arch Subject: Re: Null-terminated C strings Message-ID: <178@imagine.PAWL.RPI.EDU> Date: 22 Dec 87 11:41:46 GMT References: <261@ivory.SanDiego.NCR.COM> <164@sdeggo.UUCP> <174@quick.COM> <14116@think.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: You cant get here from there. Organization: RPI Public Access Workstation Lab - Troy, NY Lines: 29 In article <.....> people write: Lots of stuff about strings with null terminators and lengths and dope vectors and.... There are a lot of ways to implement strings in various ways and their benefits and costs. Granted that strings are necessary in a language, there are a number of ways to implement them and there are serious tradeoffs in chosing any particular implementation. When making this choice, i think personally that the simplest method should be chosen if possible. The problems with the dope vectors and embedded counts are that there is magic going on behind the scenes somewhere and often the exact semantics becomes much more difficult to describe. I have used languages that used such methods and found that on occasion odd and unexplained things would happen because things were not made explicit. Another point that has been made, and should be made again is that C is powerful enough to construct the other methods where needed. One of the virtues of C is that much is made explicit and as simple as possible and there is very little behind-the-scenes magic. The same may be said for Unix (tm), and (perhaps more germainly to this newsgroup) RISC machines. I would like to urge designers of systems, languages, and machines to adopt the same general ideas - little magic, and as simple as possible. jeff putnam (userft4z%rpitsmts@itsgw.rpi.edu, though this account is about to die)