Path: utzoo!utgpu!water!watmath!orchid!atbowler From: atbowler@orchid.waterloo.edu (Alan T. Bowler [SDG]) Newsgroups: comp.lang.c Subject: Re: C machine Message-ID: <12219@orchid.waterloo.edu> Date: 10 Jan 88 18:34:12 GMT References: <7535@alice.UUCP> <8226@steinmetz.steinmetz.UUCP> <461@auvax.UUCP> Reply-To: atbowler@orchid.waterloo.edu (Alan T. Bowler [SDG]) Organization: U. of Waterloo, Ontario Lines: 26 In article <461@auvax.UUCP> rwa@auvax.UUCP (Ross Alexander) writes: >I remember Tom Duff hacking on our GCOS/TSS implementation of B, long long >ago, with exactly the same intent. He created a whole whack of $ things >(i.e., +$, -$, *$, /$) which assumed the object was a float. Not a nice >language to actually use... > Actually, the operators are #+ #* #/ etc., and as I recall it was Renaldo Braga that did it while he was writing the compiler. The changes to the language were not a "hack". They made floating point numbers fit into the language in a manner consistent with the rest of the language. The point to realize is that B is a rather elegant small language with a uniform view of objects and how they are handled. The world of B consists of a linear array of cells (words if you like) on which operations such as addition, assignment, indirection, function call, and transfer (i.e. GOTO). are performed. This gives the programmer considerable flexibility to express his algorithm, but like everything else is open to abuse. The language maps nicely onto a class of machine archetecture, and is well suited to the class of programming tasks that is usally considered "systems programming" (utilities, compilers editors etc). The fact that it is typeless does give problems when you try to move out of this area. That is it doesn't carry well to byte addressed machines, and is not suited to numerical applications. (The floating point is good enough to calculate some things like percentage of a resource that has been used etc).