Arc Forumnew | comments | leaders | submitlogin
1 point by Grue3 6175 days ago | link | parent

Why wouldn't just (bar 12) do? It's not like there are other kinds of parameters (like keywords).


2 points by randallsquared 6174 days ago | link

Destructuring is also built in. It's not clear to me if there's a destructuring use case for (bar 12) in Arc, but I could easily see using it the way Erlang uses its pattern matching, so that (def myfn (foo (bar 12 _)) (do things)) would mean that myfn was only called if the cadr of the second argument was 12. Since '_' in this case means "don't care", I'm not sure there'd be any conflict with '_' as already used in Arc.

-----

2 points by simonb 6175 days ago | link

Yet. I for one sincerely hope the lack of keyword parameters is only temporary.

-----