My favourite strange expression [was: Challenge]

Bert Freudenberg bert at impara.de
Thu Jul 20 16:54:50 UTC 2006


Am 20.07.2006 um 17:38 schrieb Klaus D. Witzel:

> On Thu, 20 Jul 2006 15:14:29 +0200, Bert Freudenberg wrote:
>
>> Am 20.07.2006 um 11:11 schrieb Klaus D. Witzel:
>>
>>> On Thu, 20 Jul 2006 11:04:45 +0200, Bert Freudenberg wrote:
>>>
>>>> Am 20.07.2006 um 10:48 schrieb Klaus D. Witzel:
>>>>
>>>>> On Thu, 13 Jul 2006 12:39:53 +0200, Bert Freudenberg 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?
>>>>>>
>>>>>> - Bert -
>>>>>
>>>>> Found another one (relative to #7042):
>>>>>
>>>>> | philosopher mathematicians |
>>>>>   mathematicians := 2.
>>>>>   philosopher := philosopher == mathematicians.
>>>>>   OrderedCollection new
>>>>> 	addLast: philosopher;
>>>>> 	removeLast: mathematicians;
>>>>> 	size
>>>>>
>>>>> Questions 1-3 from Bert applicable to *both* issues ;-)
>>>>
>>>> Does what I'd expect in 3.8.
>>>
>>> Sure. And how about the 2nd issue? Applies to #7042 and to 3.8 as  
>>> well. Of course this might be *wanted* and I simply didn't know  
>>> that.
>>
>> I actually don't really see a second issue. Or are you implying  
>> #findLast: has the same problem?
>
> Not at all. Try the snippet after making mathematicians out of the  
> philosopher and ask for evaluation of
>
>  | philosopher mathematicians |
>    mathematicians := 2.
>    mathematicians := philosopher == mathematicians.
>    OrderedCollection new
>  	addLast: mathematicians;
>  	size
>
> All the sudden the compiler complains (when interactive), why  
> didn't it do that earlier for the very same token. Either something  
> is undefined or it is not, tertium non datur. Again, this is  
> perhaps *wanted* and I didn't know.

I see. Yes, that's a bug in the compiler. It should issue a warning.

- Bert -




More information about the Squeak-dev mailing list