Arc is built on top of Racket. Since both of them are in the Lisp family, I am curious about the the advantage of Arc over Racket, or what is the motivation of creating Arc given that Racket is available?
-
7Python is built "on top of" C, so what is the advantage of Python over C? The underlying language, unless it is exposed, is of little relevance to the power of the "top level". – drysdam Dec 18 '11 at 22:47
-
14I doubt there are any - scheme is a well-known, fairly popular language with libraries for doing things, while arc is a vanity project from a guy who made an early web store. – Marcin Dec 18 '11 at 22:50
-
1It seems sort of silly to compare a DSL with an entirely separate language. I wouldn't say "LiftWeb *or* Scala" or "Seaside *or* SmallTalk" or "Sinatra *or* Ruby", for instance. (Granted Lisp forms can really blur the distinction.) – Dec 18 '11 at 23:12
-
3@pst: Arc is being billed as *a* Lisp, therefore as a new language, rather than a DSL. This fact gives the appearance (true or not) that PG is changing things, and not just adding to Racket. If you know that to be false, that would be a useful answer, but saying that the question is silly is not helpful. – iconoclast Apr 03 '12 at 13:44
-
1@drysdam: the situation would be closer to parallel (but still not perfectly so) if Python were built on top of Ruby, and someone asked what the advantage was of Python over Ruby. If no part of Racket is left exposed, that is useful information, and could be part of a useful answer. Telling people that their question is silly is not usually very useful. – iconoclast Apr 03 '12 at 13:46
2 Answers
Writing your own language is, in a sense, empowering: you get to choose what primitives, what kinds of expressions, are convenient to write in that language. In that sense, you can look at a book like On Lisp and see that the core authors of Arc have a strong opinion on what kinds of things they'd like from a language.
If I take your question and boil it down to the essentials, it sounds like this: why should people write domain-specific languages?
(It's a separate question to consider whether the Arc folks should have re-implemented so many primitive facilities, such as their own macro and module systems, when there's already such mechanisms built into Racket. But the Arc authors are perfectly within their rights to re-invent.)
I guess one of the objections I have to Arc is this: the way they've implemented the official runtime makes it difficult to reuse the work they've done back to plain Racket. In that sense, it's effort that helps only one community, whereas it would have been nice to be able to easily benefit from the work of the Arc folks.

- 11,795
- 1
- 34
- 44
Racket is a Scheme dialect while Arc is not. They are both LISP dialects though. Arc reduces the amount of parenthesis and has some fancy built in syntax to make common stuff shorter in code size. examples:
;; scheme
(if p1 c1
(if p2 c2
(if p3 c3 a3)))
;; arc simplifies if
(if p1 c1
p2 c2
p3 c3
a3)
;; scheme
(f1(f2(f3 a b)))
;; arc simplifies cascading calls
(f1:f2:f3 a b)
;; scheme
(lambda (x) (+ x x))
;; arc simplified one argument anonymous functions
[+ _ _ ]
;; scheme array access
(vector-ref v1 5)
;; arc simplifies array access
(v1 5)
You may choose one over the other. Personally I like Arc syntax but not the fact that it is implemented as a interpreter. I wish they had implemented Arc as a Racket module language since then you could actually develope in drracket, debug and make executables. That might even allow making Racket libraries in Arc or vice versa.
If you like to make compatible code you should be more strict and use R6RS/R5RS than using racket default language or arc since then you may have code that you can run on more than just racket. In racket you may choose R5RS or use the #!R6RS as the first line in the code to force the standard. In both cases the result will be able to run under other implementations/compilers.

- 171
- 1
- 2
-
3I would say something about cond for that first case for racket. `(cond (p1 c1) (p2 c2) (p3 c3) (#t c4))` is a little of a more fair comparison. – Theo Belaire Mar 18 '13 at 20:29