HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by zachbeane | Hacker News Reader
Full thread
zachbeane
·
[insert Arc joke here]
View on HN
Entlin
·
Didn't you mean (insert Arc joke here) ?
troels
·
Doesn't matter. In Racket you can use either bracket-style, as you please.
kunjaan
·
I thought () was used for function applications and [] for those that weren't. For example (let [x 3] ... )
epochwolf
·
Nope they are interchangeable.
kunjaan
·
The compiler may not mind, but isn't that what they are actually used for?
plorkyeran
·
Not quite; in (let ([x 1] [y 2]) (+ x y)) there's a set of parens which aren't used for function (or macro) application.
Zak
·
In Arc, square brackets are shorthand for an anonymous function. The argument is an underscore. ([+ _ 2] 2) returns 4.
Reply on news.ycombinator.com