[squeak-dev] Object >> #cull:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Dec 9 18:33:29 UTC 2019


Hi Christoph,
I would be reluctant to add it to Object, because it's super hard to remove
from Object afterward...
IMO whatever condition used in place of Block should quake like a block. So
we should add cull: to those evaluable classes... Every other object should
not care.

Le lun. 9 déc. 2019 à 18:51, Thiede, Christoph <
Christoph.Thiede at student.hpi.uni-potsdam.de> a écrit :

> Hi all!
>
>
> Just another, possibly crazy idea: What about implementing #cull:,
> #cull:cull: etc. on Object?
>
>
> *Object >> #cull: firstArg*
>
> *    ^ self value*
>
>
> This could improve the polymorphy between "evaluables" such as blocks or
> MessageSends and other objects. Example:
>
>
> [2 / 0] on: ZeroDivide do: Float infinity
>
>
> Some current implementations that call both #isBlock and #cull: also
> reveal that there might be a small break in the interface. From #haltIf:
>
>
>
> Just wanted to share that thought :) In general, do you think blurring the
> differences between block and object in that way might be a good idea or
> rather a bad one? At least we already have implemented #value on Object.
>
>
> Disclaimer: I know that in many cases, you should prefer a block for
> performance reasons/compiler optimization, but there is still a gap between
> the interfaces ...
>
>
> Best,
>
> Christoph
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191209/23e7e444/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 7123 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191209/23e7e444/attachment.png>


More information about the Squeak-dev mailing list