Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Arc

< >

Arc is a programming language created in 2001 by Paul Graham and Robert Morris.

#510on PLDB 23Years Old 236Repos
Homepage · REPL · Wikipedia · Docs

Arc is a dialect of the Lisp programming language developed by Paul Graham and Robert Morris.. Read more on Wikipedia...


Example from hello-world:
(prn "Hello World")
Example from Wikipedia:
(defop said req (aform [onlink "click here" (pr "you said: " (arg _ "foo"))] (input "foo") (submit)))

Language features

Feature Supported Example Token
Strings ✓ "Hello world" "
Macros ✓ ; http://www.arclanguage.org/tut.txt ; We know enough now to start writing macros. Macros are basically ; functions that generate code. Of course, generating code is easy; ; just call list. ; ; arc> (list '+ 1 2) ; (+ 1 2) ; ; What macros offer is a way of getting code generated this way into ; your programs. Here's a (rather stupid) macro definition: ; ; arc> (mac foo () ; (list '+ 1 2)) ; *** redefining foo ; #3(tagged mac #) ; ; Notice that a macro definition looks exactly like a function ; definition, but with def replaced by mac. ; ; What this macro says is that whenever the expression (foo) occurs ; in your code, it shouldn't be evaluated in the normal way like a ; function call. Instead it should be replaced by the result of ; evaluating the body of the macro definition, (list '+ 1 2). ; This is called the "expansion" of the macro call.
Print() Debugging ✓ prn
- Build the next great programming language · Add · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements · Part of the World Wide Scroll