Sterling Clover [EMAIL PROTECTED] writes:
of course you could rewrite this in a while loop too
although you'd have to use an assignment, but at least
still not one with a silly done variable.
People seem to have overlooked the bit of Algol68 I posted,
so I'll repeat it
While If E
On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote:
It depends on arbitrary restrictions on what constitutes an
(boolean) expression, something that is anathema to
functional programmers :-) Spot the language:
while if E
then S; F
else False
fi
do T
od
It reminds me of a
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote:
It depends on arbitrary restrictions on what constitutes an
(boolean) expression, something that is anathema to
functional programmers :-) Spot the language:
while if E
then S; F
I hadn't interpreted the reminding of Knuth that way. I
wouldn't count break as a goto -- what makes goto especially
nasty is that the destination isn't indicated by the
structure of the source; it could be just anywhere. Break is
slightly more structured.
Maybe you might need to take a
Vimal wrote:
Ah, yes, it is possible in this case, but you have used an extra variable.
It is okay, but our professor doesnt want to put emphasis on
Computability here (or maybe I dont realize it), but the point is: Are
such programming constructs really necessary in a programming
language? i.e.
You get the logic and code blowup problems that require either local
variables, breaks, gotos, or continuations because you're working
with tests that generate side-effects. Mixing side-effects and tests
is going to generate a goto, sure, but if the code was rewritten in a
functional style