Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!sco!seanf From: seanf@sco.COM (Sean Fagan) Newsgroups: comp.lang.misc Subject: Re: How to make a language downward-extensible? Message-ID: <7950@scolex.sco.COM> Date: 30 Sep 90 08:42:43 GMT References: <1990Sep24.160705.21113@newcastle.ac.uk> <9363:Sep2521:41:1290@kramden.acf.nyu.edu> <7935@scolex.sco.COM> <29047:Sep2816:51:1290@kramden.acf.nyu.edu> Sender: news@sco.COM Reply-To: seanf (Sean Fagan) Organization: The Santa Cruz Operation, Inc. Lines: 51 In article <29047:Sep2816:51:1290@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >> Ugh. Are you then going to standardize *everything*? > >What are you talking about? The only thing added to the language is the >quickpick control structure. All I'm doing is letting the programmer >give the compiler a much better chance to optimize a section of code. Uhm... where are you going to define the names that are used? Or is the compiler supposed to go through your "worst-case" one, analyze it, and see which instruction matches it most closely? If it could do that already, you wouldn't need to bother with your "quickpick" thingy. If the "names" are going to be "standardized" (which is what I was referring to), you're going to have a real mess on your hands, which is why I went into the example about the elxsi et al. >No, it isn't, for the several reasons I explained in the first article >of this thread. ifdefs are clumsy to define, and they guarantee that >your program will run poorly when the hardware changes under your nose. So will your method. You would have to recompile. If you do something like: #ifdef BIT_COUNT_IN_HARDWARE __builtin_bitcount (whatever); #else whatever #endif what is the difference between *that*, and your method? Other than niggling little details? >They require that someone who wants to install the software on a new >machine figure out each one of your ridiculously many ifdefs. That is >not the portable downward extensibility that we want. Your method requires lots of things, too. Generally, though, the person who builds the compiler would figure them out, not necessarily the installer. For example, in (or something like , I guess), with the correct defines for the machine. No more difficult than installing a libc. For most people, that is. Maybe not you. -- -----------------+ Sean Eric Fagan | "Never knock on Death's door: ring the bell and seanf@sco.COM | run away! Death really hates that!" uunet!sco!seanf | -- Dr. Mike Stratford (Matt Frewer, "Doctor, Doctor") (408) 458-1422 | Any opinions expressed are my own, not my employers'.