[Pharo-users] Re: Block evaluation with n+1 arguments

2023-04-11 Thread Steffen Märcker
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

[Pharo-users] Re: Block evaluation with n+1 arguments

2023-04-10 Thread Richard O'Keefe
(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

[Pharo-users] Re: Block evaluation with n+1 arguments

2023-04-08 Thread Joachim Tuchel
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'

[Pharo-users] Re: Block evaluation with n+1 arguments

2023-04-07 Thread Noury Bouraqadi
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