We already had a similar thread some time ago, see "zöglfrex": http://forum.world.st/collect-thenDo-woes-td5103635.html :-)<br>
<br>
By the way, the idea is not completely new; for instance, JS Lodash has a chain() function too: https://lodash.com/docs/#chain<br>
<br>
Do we want support in the Trunk for this? It is an intereesting concept but changes the semantics of messaging significantly.<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-01-30T19:41:46+01:00, das.linux@gmx.de wrote:<br>
<br>
> Hi<br>
> <br>
> > On 30. Jan 2022, at 19:23, Levente Uzonyi <leves at caesar.elte.hu> wrote:<br>
> > <br>
> > On Sun, 30 Jan 2022, Tobias Pape wrote:<br>
> > <br>
> >> <br>
> >> That's just HOM with additional hops, right? ;D<br>
> >> -t<br>
> > <br>
> > Never heard about HOM. I assume you meant Higher order message[1].<br>
> > 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.<br>
> > <br>
> > 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.<br>
> > Both options have unpleasant side-effects.<br>
> > <br>
> > 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.<br>
> <br>
> <br>
> But why half the cake when we can have it whole?<br>
> @Marcel, did you have a Squeak impl back in 2005 or later of it?<br>
> <br>
> Best regards<br>
>     -Tobias<br>
> <br>