Challenge (was: Re: [Squeak 0003836]: nil ~= 1and: [1 isNil] is parsed+compiled without complaint)

David Corking lists at dcorking.com
Fri Jul 14 11:17:47 UTC 2006


On 7/13/06, Bert Freudenberg <bert at impara.de> wrote:
> >> >> Heh. My favourite strange expression is this:
> >> >>
> >> >> # "hi there" :== '_'
> >> >>
> >> >> 1) Who can guess what the result is WITHOUT trying it?
> >> >> 2) Who can explain what's happening?
> >> >> 3) Do we need to fix it?

> This expression happens to be parsed without errors and answers true
> (use "print it" to see the result). The result is unexpected for me,
> and I guess for everyone except maybe the guy who created that hack
> to allow ':=' to be used for assignment.

Thanks for explaining.  It is a useful hack for me, and, I suspect,
for many newbies (sadly in 1979 Alan Kay and Steve Jobs opted not to
persuade the world to adopt a left arrow character in standard fonts
and keyboard mappings - so even now in the days of UTF-8 the left
arrow causes some of us trouble.  For now, I still need my underscore
for SQL and for Emacs undo and I have increased sympathy for APL
users.  <grin>)

I have no opinion on whether it needs to be fixed, though I would
imagine (with my limited knowledge of smalltalk) that user objects
should not be calling Scanner directly, so should not see the change.

By the way - I need to apologise.  A few days ago I wrote "The
character set for Squeak seems to be subtly broken for some uses
of the 'left arrow'.  A few days ago, I tried to file in a .st file
that used the left arrow character for binding" .... I wrongly implied
that Squeak was somehow broken.  On cooler reflection, the fault is
more likely to be my web browser (that downloaded the .st file) or the
filesystem (that I stored it on),  as I seem to be the only one with
that particularly trouble.  Sorry for throwing stones.

David



More information about the Squeak-dev mailing list