[squeak-dev] [Discussion] Creating message sends via anObject >>> #selector ?

Francisco Garau francisco.garau at gmail.com
Thu Jun 13 13:41:45 UTC 2019


Have you looked at the Higher Order Messaging from Marcel Weiher?

http://www.metaobject.com/papers/Higher_Order_Messaging_OOPSLA_2005.pdf


> On 12 Jun 2019, at 14:31, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> 
> Hi, there.
> 
> One of our students was curious about whether the following expression could be somehow improved:
> 
> someObjects collect: [:each | self convert: each].
> 
> I suppose that the main goal was to remove the brackets. Similar to the existing symbol shortcut:
> 
> someObjects collect: #message.
> 
> Looking at all implementors of #value:, #cull: and alike, I suppose that a more convenient creation of a MessageSend could tackle this case directly:
> 
> someObjects collect: self >>> #convert:.
> 
> This feels strange. :-) Very strange. But maybe it's just me. I don't see the traditional [:each | ...] version as neither difficult to read nor write.
> 
> What do you think about adding the #>>> message to MessageSend for more compact instantiation? Do you see other scenarios of interest? Would it be just superfluous? Producing less readable code?
> 
> Best,
> Marcel
> 
> P.S.: #>>> would be close to #>>, which is implemented on Behavior to access method objects.
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190613/7a3a8e20/attachment.html>


More information about the Squeak-dev mailing list