<div dir="auto">Right, it’s not a good idea to implement value in Object like this, it doesnt really generalize anything, I suggest we remove it.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 14, 2024 at 03:14 Vanessa Freudenberg via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="ltr">On Thu, Jun 13, 2024 at 12:38 PM Ezequiel Birman via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Wouldn't the same concern exist for blocks?</blockquote><div>It is <i>expected</i> of blocks to understand <b>#value</b>. There is no concern; if you redefine <b>BlockClosure >> value</b>, the image will crash.</div></div></div></blockquote><div><br></div><div>Right. Also, look at all the implementors of #value. None of the ~30 classes only return self.</div><div><br></div><div>That means if you write </div><div><br></div><div> x := cond ifTrue: a ifFalse: b.</div><div><br></div><div>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. </div><div><br></div><div>Whereas with</div><div><br></div><div><div> x := cond ifTrue: [a] ifFalse: [b].</div><div><br></div></div><div>you do get a or b. </div><div><br></div><div>– Nessa</div><div> </div></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>