From: magnus@thep.lu.se (Magnus Olsson)
Subject: Re: Spaghetti (was Re: Branching in HLL vs. Assembler (was Re: The need for an assembler))
Organization: Theoretical Physics, Lund University, Sweden
Date: Fri, 4 Sep 1992 08:51:47 GMT

In article <16857D3B0.IQTI400@INDYCMS.IUPUI.EDU> IQTI400@INDYCMS.IUPUI.EDU (macphil) writes:
>In article <1992Sep3.100624.4444@pollux.lu.se>
>magnus@thep.lu.se (Magnus Olsson) writes:
> 
>>Of course; the fact that a language _allows_ you to write spaghetti
>>certainly doesn't imply that you _should_ do so. But if you give
>>people guns, somebody is sooner or later bound to shoot himself in the
>>foot. The "bondage and discipline" school of programming (Wirth et al)
>>advocate that a language shouldn't _allow_ people to shoot themselves
>>in the foot. I don't think I can agree wholeheartedly with that.
> 
>Of course not:
> 
>1) there'd be no easy way to separate the goofs from the programmers,
>   short of tatooing the foreheads of the goofs once they would be
>   discovered.  as it is, one can observe the code (especially if you
>   inherit the code) of a goof who @ some point may even claim (knowing
>   they cannot write quality code) "That's not all mine...I inherited
>   it as well" until you find something you know they wrote on their
>   own and you know for sure.

Surely you're joking????

>2) If Wirth trully believed languages shouldn't allow goofs to create
>   software images of themselves then a) he would more or less believing
>   programming has become enough of a science to prevent this b) wouldn't
>   have included the specs for LABEL declarations; c) "clever" tricks
>   one can learn & use to get around a strongly-typed language.

I'm not quite sure what you mean, but as far as I know

1) Wirth really does believe that you shouldn't supply goofs with the
   means to hurt themselves (but I'm sure he's enough of a realist to
   realize no language will be foolproof).

2) He deliberately crippled Pascal to make it a "good lanuage for
   teaching purposes". (I - and most hackers - would call that a policy
   bordering on the fascist, but many CS people think it's a good idea).

3) "Unfortunately", he had to defeat his own purposes by including a goto
   statement in Pascal, because otherwise the language would have been
   just too crippled to be useful.

4) He "remedied" this in Modula-2, which has EXIT and RETURN statements,
   but no GOTO.

5) All "clever" tricks you can do in Wirth's languages were either
   forced on him by the harsh demand that the language actually be usable
   (ADDRESS variables in Modula-2, for example), or were added by
   other people to their own implementations of the languages (low-level
   memory manipulation in Turbo Pascal, for example).


So, is Wirth a fascist (in the hackish sense, of course, I'm certainly
not implying anything about his political views!)? I suppose it's up
to _you_ to decide that for yourself. I agree with much of what he
does in theory, but I tend to find the practical implementations of
his ideas a bit stifling in the Real World (tm).

Magnus Olsson                   | \e+      /_
Dept. of Theoretical Physics    |  \  Z   / q
University of Lund, Sweden      |   >----<           
Internet: magnus@thep.lu.se     |  /      \===== g
Bitnet: THEPMO@SELDC52          | /e-      \q
Newsgroups: alt.folklore.computers