LWN.net Logo

A look at two new languages: Vala and Clojure

A look at two new languages: Vala and Clojure

Posted Jun 4, 2009 1:05 UTC (Thu) by flewellyn (subscriber, #5047)
Parent article: A look at two new languages: Vala and Clojure

>> Like other Lisp implementations, Clojure is interpreted

Ah, careful, you'll get a lot of Lispers' backs up with that one. Modern Lisps like Common Lisp and Scheme are not "interpreted". They are interactive, but most of them include compilers; the Common Lisp standard requires a minimal compiler, in fact, and many CL implementations don't have interpreters at all, instead compiling code as it's read in (to bytecode or machine code, depending).


(Log in to post comments)

A look at two new languages: Vala and Clojure

Posted Jun 4, 2009 9:50 UTC (Thu) by wingo (subscriber, #26929) [Link]

In fact, Clojure compiles to java bytecode as well. It's as good as java inside functions, but values leaving functions have to be boxed.

Clojure - many Lisp implementations compiled, syntax alternatives

Posted Jun 8, 2009 14:24 UTC (Mon) by dwheeler (guest, #1216) [Link]

Quite true. Many Lisp-based implementations include compilers, and many can generate very nice code (especially if given some type hints).

Some people are put off by Lisp's syntax ((((((lots of parens, no built-in infix)))))). If you're one of them, you might want to check out this page on making Lisps readable, in particular, sweet expressions.

Clojure - many Lisp implementations compiled, syntax alternatives

Posted Jun 8, 2009 15:30 UTC (Mon) by flewellyn (subscriber, #5047) [Link]

Personally, I find the parens much less difficult to deal with than the soup of braces, brackets, angle-brackets, semicolons, and the like that you get with languages like C++, Java, or C#. And the fact that there is no operator precedence (because there is no infix) means that there is no precedence lossage, and I can tell at a glance which operators will be called just by their position, without having to remember precedence rules.

Granted, the parens would be hard to keep track of without a good editor like Emacs, but I find the same to be true of other languages, be they braces-and-semicolon languages like C\C++\Java\PHP\Javascript\whatever, or whitespace-significant like Python. A good editor is essential no matter what.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds