Python 1.6 The balanced language

lobozc at my-deja.com lobozc at my-deja.com
Sat Sep 2 18:25:30 EDT 2000


In article <39B122CB.86D29C3C at letterror.com>,
  just at letterror.com wrote:
[snip]
> I have no idea what "goal-directed evaluation" is
>
apologies. here's a short excerpt from

Tom Christopher's On-Line Icon Book
http://www.toolsofcomputing.com/iconprog.pdf

Goal-directed evaluation. The most difficult aspect of Icon for
programmers
familiar with other languages is its goal-directed evaluation, that is
to say, its
backtracking control. Most languages use a Boolean data type for
controlling
the flow of execution. In most languages, relational operators produce
Boolean
values which are tested by if’s and while’s. Icon is completely
different. We’ll
spend a lot of time explaining how Icon works in Chapter 3. Briefly, in
Icon ex-pression
evaluation can succeed or fail. If the expression succeeds, it produces
a value. If it fails, control backs up to an expression it evaluated
earlier to see if
it will generate another value. If that expression does give another
value, control
starts forwards again to see if the later expression can succeed now.


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list