[Cuis-dev] unnecessary punctuation

Andres Valloud ten at smallinteger.com
Thu Jun 13 18:54:05 PDT 2024


Agreed.
-------- Original message --------From: Luciano Notarfrancesco via Cuis-dev <cuis-dev at lists.cuis.st> Date: 6/13/24  17:43  (GMT-08:00) To: Discussion of Cuis Smalltalk <cuis-dev at lists.cuis.st> Cc: Luciano Notarfrancesco <luchiano at gmail.com> Subject: Re: [Cuis-dev] unnecessary punctuation 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/20240613/b71016b2/attachment.htm>


More information about the Cuis-dev mailing list