Arc Forumnew | comments | leaders | submit | Grue3's commentslogin
1 point by Grue3 6171 days ago | link | parent | on: syntax detail: (o bar 12) ==> (bar? 12)

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

-----

2 points by randallsquared 6171 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 6171 days ago | link

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

-----