[squeak-dev] #valueWithPossibleArgument: vs. #cull:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon May 20 18:21:11 UTC 2019


I think that cull: is cross-dialect, maybe born in VW (Travis Griggs?)

Le lun. 20 mai 2019 à 17:38, Marcel Taeumel <marcel.taeumel at hpi.de> a
écrit :

> Hi, there.
>
> I think that all (6) sends in Trunk to #valueWithPossibleArgument: can be
> replaced with #cull:, which is more flexible.
>
>
> Does anyone recall the story of #cull:? Maybe we should just implement #valueWithPossibleArgument:
> on MessageSend (and maybe Symbol) to make it more consistent?
>
> For context, here is how I stumbled on it:
> #(1 2 3) collect: #even. "Works."
> 1 ifNotNil: #even. "Works."
> #(1) ifNotEmpty: #first. "Does not work."
>
> Please note that this question is not about "#(1 2 3) collect: #even"
> versus "#(1 2 3) collect: [:ea | ea even]". ;-) This is more like a case of
> surprising inconsistency...
>
> Best,
> Marcel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190520/4e5d4f77/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20228 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190520/4e5d4f77/attachment.png>


More information about the Squeak-dev mailing list