Challenge (was: Re: [Squeak 0003836]: nil ~= 1and: [1 isNil] is
parsed+compiled without complaint)
Bert Freudenberg
bert at impara.de
Fri Jul 14 11:39:05 UTC 2006
Am 14.07.2006 um 13:17 schrieb David Corking:
> 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,
You misunderstood me. I'm not at all suggesting to remove ':='
assignment. It's just that the implementation of how this is made
possible is a tiny bit obscure, or even wrong. Also, "the guy" is
most probably Dan, so you can safely assume I meant "hack" with at
least a bit of praise, too (cf. http://catb.org/jargon/html/H/
hack.html).
- Bert -
More information about the Squeak-dev
mailing list
|