Arc (programming language)
![]() |
|
Paradigm(s) | multi-paradigm: functional, procedural, reflective |
---|---|
Appeared in | 2008 |
Designed by | Paul Graham and Robert Morris |
Stable release | 3 (July 13, 2009) |
Typing discipline | dynamic, strong |
Influenced by | LISP |
Influenced | Anarki, HL |
OS | Cross-platform, runs on the Racket compiler |
License | Perl Foundation's Artistic License 2.0 |
Usual filename extensions | .arc |
Website | http://arclanguage.org/ |
Arc is a dialect of the Lisp programming language now under development by Paul Graham and Robert Morris.
Contents |
History
In 2001 Paul Graham announced[1] that he was working on a new dialect of Lisp named "Arc". Over the years since, he has written several essays describing features or goals of the language, and some internal projects at Y Combinator have been written in Arc, most notably the Hacker News web forum and news aggregator program.
In the essay Being Popular[2] Graham describes a few of his goals for the language. Among the claimed design goals are that "Arc should be hackable" and "there should be good libraries"; Graham also proposes:
It would not be far from the truth to say that a hacker about to write a program decides what language to use, at least subconsciously, based on the total number of characters he'll have to type. If this isn't precisely how hackers think, a language designer would do well to act as if it were.
Paul Graham suggests John McCarthy's original Lisp to have been built wholly on a small set of "axioms", and maintains that Arc ought to be constructed in a similar way, even when that means the language may not have features that large organizations want. Specifically, Graham feels that object-orientation is not useful as OO methods and patterns are just "good design," and he sees the language features used to implement OO as partially mistaken.[3][4]
A controversy among Lisp programmers is if, and how much, the S-expressions of the language should be complemented by other forms of syntax. Graham feels that additional syntax should be used in situations where pure S-expressions would be overly verbose, saying, "I don't think we should be religiously opposed to introducing syntax into Lisp." Graham also feels that efficiency problems should be solved by giving the programmer a good profiler.
Examples
Hello world in Arc :
(prn "Hello, World")
A program used by Paul Graham to illustrate Arc's terseness.[5] It produces at the url "/said" a form with one field. When the form is submitted, it leads to a page with a link that says "click here", which itself leads to a page with the value of the original input field.
(defop said req (aform [onlink "click here" (pr "you said: " (arg _ "foo"))] (input "foo") (submit)))
Versions
Official version
The first publicly released version of Arc was made available on 29 January 2008,[6] implemented on top of Racket ("MzScheme" at that time). The release comes in the form of a .tar archive, containing the Racket source code for Arc. A tutorial[7] and a discussion forum[8] are also available. The forum uses the same program that news.ycombinator.com, and is itself written in Arc.
Unofficial versions
Due to the slow development of the official Arc branch, some members of the Arc community started unofficial repositories with unofficial emendations, extensions and libraries. One version, Anarki[9], was started to continue development after some members of the community came to feel that the development of Arc centralized under Paul Graham had become stagnant. The community-managed wiki[10] is a better source of information than the official site at this point. (Citation?)
Rainbow[11] is an implementation of Arc in java
References
- ^ Arc at 3 Weeks (Paul Graham)
- ^ Essay:Being Popular
- ^ Why Arc Isn't Especially Object-Oriented
- ^ Arc FAQ
- ^ Take the Arc challenge
- ^ Arc's Out (29 January 2008)
- ^ tutorial
- ^ discussion forum
- ^ Anarki Repository on Github
- ^ The arc language wiki
- ^ Rainbow, an implementation of Arc in java by Conan Dalton
External links
- Arc website
- The Arc forum for users of the Arc language.
- A terse arc/lisp introductory tutorial
- Arc FAQ
- arcfn.com, documentation / discussion on arc and anarki
- practical-scheme.net/wiliki/arcxref an arc wiki
- The Hundred-Year Language, an essay