Re: Block evaluation with n+1 arguments
Steffen Märcker <[email protected]> Tue, 11 Apr 2023 15:59:24 +0000
| Newsgroups | gmane.comp.lang.smalltalk.vwnc |
|---|---|
| Message-ID | <[email protected]> |
Dear Ralf, that's precisely what I had in mind. Good to know that there are no other primitives that might help. Best, Steffen Ralf Propach schrieb am Donnerstag, 6. April 2023 19:16:14 (+02:00): > Hi Steffen, > > you cannot add such #value:value:[...] methods to BlockClosure, the VM does not support them, the maximum is 3. > So the answer to the first question also is: you cannot, except special case for args size up to 2. > > Ralf > > Am 06.04.2023 um 15:28 schrieb Steffen Märcker: > > Hi! > > > > I want to evaluate a block an argument 'arg1' and additional n arguments > > given in an array 'args'. The following code does the trick: > > > > block valueWithArguments: (Array with: arg1) , args. > > > > Is there a way to do this without the overhead of creating a new Array? > > (How) Can I add additional #value:value:[...] methods to BlockClosure that > > evaluate the block with n arguments directly without falling back to > > #valueWithArguments: ? If yes, what's the maximum? > > > > Cheers! > > Steffen > -- Gesendet mit Vivaldi Mail. Laden Sie Vivaldi kostenlos von vivaldi.com herunter.