[OT] Writing a parser for BASIC in Smalltalk/Squeak ? (<CSOTD > included)

Bijan Parsia bparsia at email.unc.edu
Thu Jan 10 01:55:58 UTC 2002


On Wed, 9 Jan 2002, Withers, Robert wrote:

> Tim,  I don't agree.  Don't rely on books so much {raspberry sound effects}
> ;-)  Consider that in:
> 
> | m n  |
> n := 2.
> m := 3.
> n := m + (m := n).
> 
> m is the receiver of the plus message and not another argument, as in your
> example, so it gets pushed onto the stack before the arguments are
> evaluated, inline.
[snip]

If you write code like that you *deserve* to be confused. We should add
some "optimizing" code that randomizes the results so that there's *NO
HOPE* of being unconfused!

(Interestingly, I was just rereading the Icon programming book. In Icon,
just about everything is an expression, including assignments, and they
can succeed or fail, and compound expressions' success depend on the
success of their componants. Very interesting.)

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list