Arc (programming language)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Arc
Arc programming language logo.jpeg
Paradigm(s) multi-paradigm: functional, procedural, reflective
Designed by Paul Graham and Robert Morris
Appeared in 2008
Stable release 3 / July 13, 2009 (2009-07-13)
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
Filename extension(s) .arc
Website http://arclanguage.org/

Arc is a dialect of the Lisp programming language now under development by Paul Graham and Robert Morris.

History[edit]

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: "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.

According to Paul Graham, John McCarthy's original Lisp was built on a small set of "axioms". He wants Arc constructed in a similar way, even if that strips the language of features large organizations want. Specifically, Graham thinks object-orientation is not useful, as OO methods and patterns are just "good design". He sees language features used to implement OO as partially mistaken.[3][4]

Lisp programmers disagree on how much S-expressions should be complemented by other forms of syntax. Graham thinks additional syntax should be used in situations where pure S-expressions would be too verbose, saying, "I don't think we should be religiously opposed to introducing syntax into Lisp." Graham also thinks efficiency problems should be solved by giving the programmer a good profiler.

Examples[edit]

Hello world in Arc :

 (prn "Hello, World")

A program used by Paul Graham to illustrate Arc's terseness.[5] It produces a form with one field at the url "/said". 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[edit]

Official version[edit]

The first publicly released version of Arc was made available on 29 January 2008,[6] implemented on top of Racket ("PLT-Scheme" 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 does, and is itself written in Arc.

Unofficial versions[edit]

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] permitted [10] anyone to submit changes to the project. The community-managed wiki[11] is a better source of information than the official site at this point.[citation needed]

Rainbow[12] is an implementation of Arc in Java.

Arcadia[13] is an easy implementation of Arc in C.

References[edit]

External links[edit]