XOR: don't recieve a block

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

XOR: don't recieve a block

Diogenes Moreira
Hi folks..

 i found today, that xor: don't recieve a block and recibe aBoolean

 i can guess,  it is wrong, because, the other logic operations
recieve blocks like parameters..

I this a bug?


Best Regards

Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Stéphane Ducasse
& |  don't
Do not cnfuse lazy and the others.

Stef

On Nov 18, 2010, at 6:24 PM, Diogenes Moreira wrote:

> Hi folks..
>
> i found today, that xor: don't recieve a block and recibe aBoolean
>
> i can guess,  it is wrong, because, the other logic operations
> recieve blocks like parameters..
>
> I this a bug?
>
>
> Best Regards
>


Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Diogenes Moreira
Oki.

Sorry.

On Thu, Nov 18, 2010 at 2:33 PM, Stéphane Ducasse
<[hidden email]> wrote:

> & |  don't
> Do not cnfuse lazy and the others.
>
> Stef
>
> On Nov 18, 2010, at 6:24 PM, Diogenes Moreira wrote:
>
>> Hi folks..
>>
>> i found today, that xor: don't recieve a block and recibe aBoolean
>>
>> i can guess,  it is wrong, because, the other logic operations
>> recieve blocks like parameters..
>>
>> I this a bug?
>>
>>
>> Best Regards
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Marcus Denker-4
In reply to this post by Diogenes Moreira

On Nov 18, 2010, at 6:34 PM, Stéphane Ducasse wrote:

> & |  don't
> Do not cnfuse lazy and the others.


true xor: [false]

--> walkback.

false xor: [false]

--> [false]

There is a call to #value missing (which will keep it working with booleans, too, as they understand
#value, too (returning self)).

        Marcus

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Levente Uzonyi-2
On Thu, 18 Nov 2010, Marcus Denker wrote:

>
> On Nov 18, 2010, at 6:34 PM, Stéphane Ducasse wrote:
>
>> & |  don't
>> Do not cnfuse lazy and the others.
>
>
> true xor: [false]
>
> --> walkback.
>
> false xor: [false]
>
> --> [false]
>
> There is a call to #value missing (which will keep it working with booleans, too, as they understand
> #value, too (returning self)).
That's a possible solution, but xor can't be lazy, so the block is just
pointless.


Levente

>
> Marcus
>
> --
> Marcus Denker  -- http://www.marcusdenker.de
> INRIA Lille -- Nord Europe. Team RMoD.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Marcus Denker-4
In reply to this post by Marcus Denker-4

On Nov 18, 2010, at 6:58 PM, Levente Uzonyi wrote:

> On Thu, 18 Nov 2010, Marcus Denker wrote:
>
>>
>> On Nov 18, 2010, at 6:34 PM, Stéphane Ducasse wrote:
>>
>>> & |  don't
>>> Do not cnfuse lazy and the others.
>>
>>
>> true xor: [false]
>>
>> --> walkback.
>>
>> false xor: [false]
>>
>> --> [false]
>>
>> There is a call to #value missing (which will keep it working with booleans, too, as they understand
>> #value, too (returning self)).
>
> That's a possible solution, but xor can't be lazy, so the block is just pointless.
>
So the question is if we do it for consistency...
(between or:, and:, xor:. They are so close that it's strange to have different parameters for them.

On the negative side, it does cost a send of #value (quick return self) for
the case that one calls it on a boolean...

        Marcus

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Diogenes Moreira
Do not know if this matters, but I'm seeing a copy of the definition
of the definition smalltalk ANSI 1997 and xor: should receive both
blocks and Booleans

Ill trying send to you.

On Thu, Nov 18, 2010 at 3:16 PM, Marcus Denker <[hidden email]> wrote:

>
> On Nov 18, 2010, at 6:58 PM, Levente Uzonyi wrote:
>
>> On Thu, 18 Nov 2010, Marcus Denker wrote:
>>
>>>
>>> On Nov 18, 2010, at 6:34 PM, Stéphane Ducasse wrote:
>>>
>>>> & |  don't
>>>> Do not cnfuse lazy and the others.
>>>
>>>
>>> true xor: [false]
>>>
>>> --> walkback.
>>>
>>> false xor: [false]
>>>
>>> --> [false]
>>>
>>> There is a call to #value missing (which will keep it working with booleans, too, as they understand
>>> #value, too (returning self)).
>>
>> That's a possible solution, but xor can't be lazy, so the block is just pointless.
>>
> So the question is if we do it for consistency...
> (between or:, and:, xor:. They are so close that it's strange to have different parameters for them.
>
> On the negative side, it does cost a send of #value (quick return self) for
> the case that one calls it on a boolean...
>
>        Marcus
>
> --
> Marcus Denker  -- http://www.marcusdenker.de
> INRIA Lille -- Nord Europe. Team RMoD.
>
>
>

standard_v1_9.doc.tar.bz2 (295K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: XOR: don't recieve a block

Peter van Rooijen
In reply to this post by Levente Uzonyi-2
Levente is of course right, apologies for not reading
up more before making the same point belatedly
(and with many more words).

So I'll keep on reading now and keep quiet :-).

Cheers, peter

On Thu, 18 Nov 2010 18:57:58 +0100, Levente Uzonyi <[hidden email]> wrote:

> On Thu, 18 Nov 2010, Marcus Denker wrote:
>
>>
>> On Nov 18, 2010, at 6:34 PM, Stéphane Ducasse wrote:
>>
>>> & |  don't
>>> Do not cnfuse lazy and the others.
>>
>>
>> true xor: [false]
>>
>> --> walkback.
>>
>> false xor: [false]
>>
>> --> [false]
>>
>> There is a call to #value missing (which will keep it working with  
>> booleans, too, as they understand
>> #value, too (returning self)).
>
> That's a possible solution, but xor can't be lazy, so the block is just
> pointless.
>
>
> Levente
>
>>
>> Marcus
>>
>> --
>> Marcus Denker  -- http://www.marcusdenker.de
>> INRIA Lille -- Nord Europe. Team RMoD.
>>
>>


--
Peter van Rooijen
Nijlring 83
5152 VJ Drunen
m: 06-2854 2048