[OT] Writing a parser for BASIC in Smalltalk/Squeak ? (<CSOTD > included)
Tim Rowledge
tim at sumeru.stanford.edu
Thu Jan 10 03:23:59 UTC 2002
"Withers, Robert" <rwithers at quallaby.com> is widely believed to have written:
> Tim, I don't agree. Don't rely on books so much {raspberry sound effects}
> ;-)
What!?! Sacriledge!
> 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.
I don't care what is actually happening now; my point is that it is
_wrong_ to have code work in a way that is so absurdly confusing. I can
see just what the bytecode stream is doing and thus why the answer is
currently what it is but that just ain't a good excuse. Evidence of past
foolishness is not evidence for continued foolishness.
Does anyone really think that it is _proper_ that
| m n |
n := 2.
m := 3.
n := m + (m := n).
gives a different answer to
| m n |
n := 2.
m := 3.
m := n.
n := m + m.
??
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Don't let the computer bugs bite!
More information about the Squeak-dev
mailing list
|