Arc (programming language)

This is an old revision of this page, as edited by Tea2min (talk | contribs) at 08:28, 29 October 2007 (Categorization). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Arc is a dialect of Lisp, currently developed by Paul Graham. He wants to make it a language for hackers, because "a programming language is good as a programming language (rather than, say, an exercise in denotational semantics or compiler design) if and only if hackers like it."

His essay Being Popular describes some of its aims:

  • Code should be brief:

    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.

  • Arc should be hackable: you should be able to do what you want.
  • The design should rest on both the least number of axioms (ie. core features) and the least number of restrictions possible. The former allows more of the language to be defined in itself, leaving the core cleaner and increasing hackability, the latter is a consequence of Arc being "a language for smart people", making it undesirable to forbid potentially dangerous, but meaningful and logically consistent actions.
  • The language should be good for writing throwaway programs, because "many evolve into real programs, with real features and real users."
  • There should be good libraries for Arc: "Of course the ultimate in brevity is to have the program already written for you, and merely to call it."
  • There should probably be syntax: it would make code shorter and easier to read. "I don't think we should be religiously opposed to introducing syntax into Lisp, as long as it translates in a well-understood way into underlying s-expressions."
  • Object orientation is not a design goal, nor is it a part of the language as such. Graham sees much of the OO-related discussion and features attributed to OO partially as an obvious follow-up to good design, and partially as mistaken[1][2].
  • Arc should generate fast code. The key for this is more in good profiling and optional type declarations than in, say, making the entire language strongly typed.

As part of his work on Arc, Paul Graham began developing an email client and decided it needed a good spam filter. It has a simplified naive Bayes classifier he described in "A Plan for Spam". The first 'non-trivial' application in Arc, as described by Graham in its announcement, was Y Combinator Startup News, a web-based application supporting a user-ranked list of links related to startup companies.

Implementation Details

There exists a preliminary ARC implementation, currently on top of MzScheme[3][4], which is a variant of plt-scheme.

References