Arc Forumnew | comments | leaders | submitlogin
3 points by okplus 6162 days ago | link | parent

What if _ was a list in the event that the function was passed more than one argument? With the . syntax, you could use _.1, _.2 for an arbitrary number of arguments, and wouldn't have to introduce __ to access the list of arguments.


1 point by absz 6162 days ago | link

Hmmm, I like that. The only problem is that then you can't just say _ to access the first argument, and one-argument functions are the most common case. So you'd either need a new name for _ or a different name for the list, it seems to me, and those break symmetry.

-----

1 point by okplus 6161 days ago | link

Easy, when one argument is passed, assign _ to the first argument of the arg list. It wouldn't change anything about current [] expressions.

-----