[squeak-dev] The Trunk: Collections-ct.982.mcz

Levente Uzonyi leves at caesar.elte.hu
Sun Jan 30 18:23:53 UTC 2022

On Sun, 30 Jan 2022, Tobias Pape wrote:

> That's just HOM with additional hops, right? ;D
> -t

Never heard about HOM. I assume you meant Higher order message[1].
In that case, ChainedObjectWrapper is similar but different: it only 
adds one selector to Object, #wrap:, which is only there for convenience. 
It could be a class-side method of ChainedObjectWrapper.

While HOM either adds all those selectors with one less argument to all 
those classes, e.g #select to everything that implements #select:, or it 
implements #doesNotUnderstand: on Object.
Both options have unpleasant side-effects.

Another difference is the purpose. The idea here is to turn cascaded 
messages sent to the wrapper into chained message sends to the wrapped 
object inside a single block. So that you don't feel like implementing 
#select:thenCollect:andFinallyReject: and friends.


[1] https://en.wikipedia.org/wiki/Higher_order_message

More information about the Squeak-dev mailing list