From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: bob@lintilla.demon.co.uk (Bob Cousins) Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/09/06 Message-ID: <322f864d.42836625@news.demon.co.uk>#1/1 X-Deja-AN: 178789651 x-nntp-posting-host: lintilla.demon.co.uk references: <01bb8df1$2e19d420$87ee6fce@timpent.airshields.com> <4vcac4$gm6@zeus.orl.mmc.com> <01bb8f19$9a89d820$32ee6fce@timhome2> <841797763snz@genesis.demon.co.uk> newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-09-06T00:00:00+00:00 List-Id: Mark Wooding wrote: >Lawrence Kirby wrote: >> In article <01bb8f19$9a89d820$32ee6fce@timhome2> >> tim@airshields.com "Tim Behrendsen" writes: >> >> >There is no other view than the procedural view. >> >> Some functional language programmers might take issue with that >> statement. Prologgers may have a thought or two also. > >I've not come across a computer yet which doesn't work by fetching an >instruction (or maybe a few at a time), doing them, and then going off >and fetching some more. I guess you can pretend that this isn't the >case, and maybe come up with some nice ways of presenting algorithms >which don't depend on this, but that's not the way things work >underneath. The One True View is that sequence of instructions; all >else is an illusion. Maybe it's a helpful illusion, but illusion it is >nonetheless. I am afraid your view is severely limited, on two counts. 1. It could be argued that executing a sequence of intructions is the "illusion". It appears to you that that is what happens, but all the CPU does is respond to a set of input signals on its pins, combines them with states in internal registers, and produces a new set of output pins and register states. The CPU is just a complex state machine. It is just an abstraction that it executes instructions. Of course we have designed it to behave according to our abstraction. If the CPU generated non-sensical outputs, it would still be the same complex state machine, but we would not regard it as executing instructions. In fact, executing instructions is such a useful abstraction, that in nearly all complex processors, there is a smaller processor executing microcode, and in even more complex ones, the embedded processor is executing nanocode, but at the lowest level we get to a hardware state machine. The abstraction can be carried upwards, so that we can regard a functional language as evaluating functions. It does not matter that underneath instructions are being executed, because at the very lowest level its just electrons whizzing around silicon. We could even implement the functional language on a non-digital computer. 2. You either assume or mean that computer refers to a conventional von-Neumann style digital computer. Analog computers do not execute instructions as such, but they can be programmed and solve problems by producing a set of outputs given a set of inputs. There was a rather neat economic simulation which was implemented as a set of water tanks and pipes, and it produced quite good results. Of course, it was only implementing an abstract functional model of an economy. Finally, you or may not consider that the human brain is a biological computer, and that does not appear to work by fetching instructions and executing them. So the very concept of instructions executing in sequence is an illusion created within our own non-digital, non-sequential, massively parallel active memory analog computer. Regards, -- Bob Cousins, Software Engineer. Home page at http://www.demon.co.uk/sirius-cybernetics/ Note: Commercial email to bob@lintilla.demon.co.uk will be subject to a $500 handling fee. Sending of such email constitutes acceptance of these terms.