[Cuis-dev] unnecessary punctuation

Luciano Notarfrancesco luchiano at gmail.com
Thu Jun 13 17:43:22 PDT 2024


Right, it’s not a good idea to implement value in Object like this, it
doesnt really generalize anything, I suggest we remove it.

On Fri, Jun 14, 2024 at 03:14 Vanessa Freudenberg via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> On Thu, Jun 13, 2024 at 12:38 PM Ezequiel Birman via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Wouldn't the same concern exist for blocks?
>>
>> It is *expected* of blocks to understand *#value*. There is no concern;
>> if you redefine *BlockClosure >> value*, the image will crash.
>>
>
> Right. Also, look at all the implementors of #value. None of the ~30
> classes only return self.
>
> That means if you write
>
>     x := cond ifTrue: a ifFalse: b.
>
> and you expect x to be either a or b, you might be in for a surprise if
> you happen to pass in a or b that implements value.
>
> Whereas with
>
>     x := cond ifTrue: [a] ifFalse: [b].
>
> you do get a or b.
>
> – Nessa
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240614/794c7f17/attachment-0001.htm>


More information about the Cuis-dev mailing list