Hi Joachim,
interesting approach. Unfortunately it won't work here, since the additional
argument has to be the first. But I keep it in mind for another use case.
Ciao,
Steffen
Joachim Tuchel schrieb am Samstag, 8. April 2023 10:42:08 (+02:00):
Steffen,
if you fear performance bottle
(1) I have #value:valueWithArguments: in my personal library.
(2) The way to answer your question is to look at #valueWithArguments:,
It normally goes through a primitive.
However, it *does* have backup code that you could adapt.
(3) Without benchmarking, it's not clear whether the cost of
Steffen,
if you fear performance bottlenecks, did you consider using a Stream as
a single block parameter?
Your requirement sounds a bit as if you do some diving into a structure
(recursion?) where "someone" (maybe even conditionally) adds another
argument before the block is evaluated. I'
Steffen,
My first response, is do NOT optimize too early. The performance bottlenecks
are not always where we think they are.
In Pharo you can add methods to BlockClosure class. You can go up to 255
arguments IIRC.
But, of course there is no primitive to handle them, so you endup writing the
s