I’ve been meaning to write about my expectations for Paul Graham’s Arc and I’ve decided to take the time tonight to do it.
Language
About Arc, the language, I hope that it retains the cool flavor from Lisp while bringing forth new, fresh things. Having syntax for some of the common idioms seems like a good idea to me. I like the [+ _ 1] form for a lambda expression of one argument (this would translate to: (fn (x) (+ x 1)) ). Another thing that seems nice is the array syntax. In Common Lisp, to get the nth element of an array, you’d use the aref function. Paul wants to make it possible to say something like (arr 2) to get the third (or second, I’m not sure if his arrays are 1-indexed. I’m pretty sure they aren’t) element off the variable array. I guess that means making arrays closures. That could look something like the following (in Scheme):
(define (make-array vec)
(lambda (n)
(vector-ref vec n)))
(define arr (make-array #(1 2 3 4 5)))
(arr 3) ; Returns 4
That would definitly be something nice. Three of the four loops are, but I can’t understand why he put in for, which is pretty much exactly like C languages. I would’ve prefered Common Lisp’s infamous loop facility, but Paul hates it, so I wouldn’t count on it.
Implementation
I’m not a compiler writer, so I don’t know much about implementing a language, but I hope Arc’s implementation is not written completely in C like Python, Perl and Ruby. I hope it will be more like Factor, SBCL or Squeak, something self-hosted. I don’t particularily care if it’s a native compiler or built on a VM, but as long as C is not predominant in Arc, I’ll be happy.
Other than the compiler, I hope that Arc has the following: a good profiler, a good debugger, an interactive REPL, a good Emacs mode, a documentation tool (sort of like RDoc) and a tool to install Arc software (like RubyGems)
Libraries
When Arc is released, it will probably attract a lot of curious developers. If it wishes to keep them, I think it should be practical from the beginning, not just a “Oh it’s nice, but I can’t write anything with it yet” language. Libraries are often what keeps developers around, just look at CPAN and how some people refuse to move away from Perl because of it. Therefore, I think Arc should have the following libraries: regular expressions, net libraries (http, ftp, smtp, etc.), XML processing, file system interaction (files and directories). Of course, other libraries are needed to make a language very popular, but I believe those would definitly help Arc.
Posted by gnuvince
Posted by gnuvince
Posted by gnuvince