Add support for blocks with arbitrary number of arguments #94
Labels
enhancement
Improves the implementation with something noteworthy
good first issue
Are you trying to have a good at SOMns? Start here!
language-design
Not everything is in the spec, sometimes, we need to decide what's best.
Projects
Milestone
Currently, we only support blocks with up to two arguments (in addition to self).
So, the best we can do is
[:a :b | #foo ] value: 1 with: 3
.Thus, we can't have blocks with 3 or more arguments. The implementation is currently also based on Smalltalk classes
Block1
,Block2
,Block3
with the corresponding interface.It would be good to lift that restriction and enable blocks with more arguments.
I am not sure what the best way forward is.
I am also not sure whether blocks should support currying or 'culling' (I think that's the term used in Pharo). So, basically the question is whether a block should handle activation with insufficient amount of arguments.
We should look into Newspeak, Pharo, TruffleMate, Grace, etc to see options on how to handle this.
The text was updated successfully, but these errors were encountered: