tbf positional arguments are already bad enough. Now if you’re using over 9 positional args… just take a break, go for a short walk, and maybe you’ll come back with a better plan
I mean 4 is probably too many, 8 definitely is, but also what about splat-args like zip or min. Why not stop at 4? Why not stop at 8 since its a power of two? Any hand-picked limit just feels pretty bleh to me. Either support everything or dont support it at all IMO
Why overthink it. Stopping at the highest single digit decimal number is a fine choice. I’m more unsettled by the sequence starting at _1 instead of _0 if anything.
If you need a lambda with 10 parameters you might consider aggregating those parameters into a struct or a hash instead. lambda are meant to be short functions
Is it just me or does it feel kinda unclean for it to just support 1 through 9?
tbf positional arguments are already bad enough. Now if you’re using over 9 positional args… just take a break, go for a short walk, and maybe you’ll come back with a better plan
I mean 4 is probably too many, 8 definitely is, but also what about splat-args like zip or min. Why not stop at 4? Why not stop at 8 since its a power of two? Any hand-picked limit just feels pretty bleh to me. Either support everything or dont support it at all IMO
Why overthink it. Stopping at the highest single digit decimal number is a fine choice. I’m more unsettled by the sequence starting at
_1
instead of_0
if anything.If you need a lambda with 10 parameters you might consider aggregating those parameters into a struct or a hash instead. lambda are meant to be short functions