Arc Forumnew | comments | leaders | submitlogin
1 point by greatness 6117 days ago | link | parent

So, in this case would _ bind to the same thing as a, or do you mean it would bind to the entire construct before it was destructured?

  _ = a
or

  _ = (a . ( b . c))
I don't know if I like the idea of using [] to accept an indeterminate amount of parenthesis, it seems like it would make the functions created inside of them more complicated. On the other hand, I think this might be one of those cases where it SEEMS like a bad idea, but is actually better than it appears, so you can't really judge it until you've tried it out.


1 point by drcode 6117 days ago | link

_ = (a . ( b . c))

What I'm arguing is that the _ would let you grab the original parameter without destructuring. Sometimes (like in my example) it's useful to have access to the original parameter. This is especially since, unlike CL, arc destructuring is lossy, since it allows (car nil) -> nil.

-----