Anyway, (Halt ifTrue: a = 2) does not make it. We all expect the
ifTrue: condition to lie left of the message...
So Halt if: a = 2, or Halt when: a = 2 are far better selectors IMO.

Nicolas

2011/8/29 Luc Fabresse <[email protected]>:
>
> 2011/8/29 Levente Uzonyi <[email protected]>
>>
>> On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
>>
>>> and we could keep all the Object method in a extension of the halt
>>> packages and just some of them as forward to Halt.
>>>
>>> I know that there was an attempt on the inbox to do that. But I was
>>> worried that people will complain.
>>> Now cleaning Object would be nice.
>>>
>>> Stef
>>>
>>> On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
>>>
>>>> We have a class Halt and the class-side is empty. This seems to be the
>>>> right place to hold all the code in the protocols #debugging and
>>>> #debuggin-haltonce of Object. With a few renames we could get a really
>>>> nice DSL:
>>>>
>>>>   Halt now.
>>>>   Halt if: a = 2.
>>>
>>> why not
>>>        Halt ifTrue: [a = 2].
>>>
>>> ?
>>>
>>> two questions in my questions :)
>>> [] and True:
>
>
> Hi Levente,
>
>>
>> Currently you can't send #ifTrue: to any object.
>
> I did not get this interesting point.
> I know that ifTrue: ... messages are optimized with special bytecodes.
> But, implementing Halt class>>ifTrue: would work.
> What am I missing?
>
> Thanks,
>
> Luc
>
>>
>> If you want to enable that, then you have to:
>> - remove the optimization which will result in worse performance and will
>> break code that assumes this method is atomic
>> - or you have to change the compiler to generate extra bytecodes which
>> will perform the real message send when the receiver is not a boolean and
>> change the VM to not send the message in specialObjectsArray (currently
>> #mustBeBoolean), but execute those extra bytecodes
>> - or you have to change the handling of NonBooleanReceiver, use the
>> decompiler to find out what has to be sent to who, etc.
>
>
>
>
>
>
>>
>> Btw Halt if: a = 2 is much more readable IMHO.
>>
>>
>> Levente
>>
>>>
>>>>   Halt once.
>>>>
>>>> Lukas
>>>>
>>>>
>>>> On 28 August 2011 19:47, Marcus Denker <[email protected]> wrote:
>>>>>
>>>>> On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
>>>>>
>>>>>>
>>>>>> 2. Using Object to halt causes bloat, and doesn't buy much (except
>>>>>> that's
>>>>>> how we've always done it).
>>>>>
>>>>>
>>>>> Back in the days, we were virtually crucified for introducing the
>>>>> Beeper class along the
>>>>> same reasoning...
>>>>>
>>>>> The Beeper actually got very depressed due to having his very existance
>>>>> being
>>>>> questioned.
>>>>>
>>>>> "I am just the result of a random refactoring" he was complaining
>>>>> "maybe I should just
>>>>> just delete myself and everyone will be happy".
>>>>>
>>>>> (you know, reflection *is* dangerous! There has been a lot of talk to
>>>>> make reflection more
>>>>> secure... for a reason!).
>>>>>
>>>>> To cheer him up, I gave him the lead role in a real, peer reviewed
>>>>> Paper:
>>>>>
>>>>>       http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
>>>>>
>>>>> The Beeper thus was the first Class to be really "Meta" in the history
>>>>> of
>>>>> Objects. What a thrill. In an interview, the Beeper said: "You know,
>>>>> being meta is hard
>>>>> to decribe... Classes claim to be Meta all the time. But I doubt they
>>>>> ever really are Meta. Being
>>>>> Meta is special. The whole System looks different when meta!"
>>>>>
>>>>> ;-)
>>>>>
>>>>> --
>>>>> Marcus Denker -- http://marcusdenker.de
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lukas Renggli
>>>> www.lukas-renggli.ch
>>>>
>>>
>>>
>
>

Reply via email to