From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,2afd440a210c7fb0 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,6bdc5c27a0dec527 X-Google-Attributes: gid1014db,public From: peter@baileynm.com (Peter da Silva) Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/09/08 Message-ID: <6t2c1i$7on@web.nmti.com>#1/1 X-Deja-AN: 388926259 References: <0095000017115526000002L062*@MHS> <6t18af$p83$1@Starbase.NeoSoft.COM> <6t1i0l$241@web.nmti.com> <6t24vj$kep$1@Starbase.NeoSoft.COM> Organization: Bailey Network Management Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c In article <6t24vj$kep$1@Starbase.NeoSoft.COM>, Jordan Henderson wrote: >If nul-terminated string *constants* are a "feature" of the language, then >so are nul-terminated strings. Denying this is like saying that >ints aren't a part of the language, just int constants. After all, what >you _do_ with an int variable is outside of the definition of the language. The language defines operations on ints. It defines operations on pointers to characters. It doesn't define any operations on strings. This isn't nit-picking[1]. You can define an environment where all string operations are performed on opaque objects, and string constants are only used to initialize them by calling a macro "string(foo)", and the compiler is allowed to optimise "string(foo)" at compile time to a reference to that opaque object, with no run-time overhead at all. If there were built-in operations on strings that no longer worked on this opaque object then that wouldn't be the case. [1] Well, not entirely. Like, you couldn't redefine strings like this in Pascal or Fortran or Modula. In any case I've obviously let my c-language-pedant skills get rusty... I messed up on exactly when the winged monkeys are invoked, so I best go meditate on The Standard again. Reading the Version 6 source code really messes you up, you know. There's some heavily abusive code in there. -- In hoc signo hack, Peter da Silva `-_-' "If Microsoft don't think you need it, it's not there and there's no 'U` way to include it yourself." -- Geoff Lane, a.s.r.