conditional expressions (RE: Loop-and-a-half (Re: Curious assignment behaviour))

Steve Holden sholden at holdenweb.com
Tue Oct 16 12:21:17 EDT 2001


"Paul Rubin" <phr-n2001d at nightsong.com> wrote ...
> Ian Parker <parker at gol.com> writes:
> > >How did Algol 60 deal with this?
> >
> > to excess, and with a more complicated parser, I imagine:
> >
> >
> > Because statements are expressions in Algo68, the 'if' clause returns a
> > value, and can be used as both a statement and an expression, and either
> > can be squeezed onto one line or spread across multiple lines.
>
> Algol 60 wasn't anything like Algol 68 though.  Its parser had to have
> been pretty simple.

Says who? Many Algol 60 parsers were completely ad-hoc, even though the
Algol 60 definition was an attempt at providing clear syntax specifications
(shame there were no I/O semantics, though ...)

Later work provided syntax-driven parsers, but "simple" is a relative term:
even recursive-descent was a step above the norm in the early days of Algol
60.

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list