Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Through the lens of this example, Lisp does not offer any advantage. In fact, I'd argue, that Python, Ruby, JavaScript, C#, and even Haskell are simply explorations of this example, and others like it, with intentional ignorance of some of the other advantages Lisp offers.

The one thing that all those languages drop from Lisp is Homoiconicy [1]. There are entire other categories of "Eureka Moments" that you can experience with Lisp through the lens of homoiconicy. This is at the heart of the utility of Macros, but macros can exist without homoiconicy and there are other benefits besides easier macros.

What makes Clojure, in particular, interesting is that it's Homoiconic in terms of more than just sequences: There's also maps, sets, etc. Common Lisp & Scheme encode maps, sets, etc in terms of lists.

If you're having a hard time seeing past the syntax (or a lack thereof), I suggest exploring Mathematica. Download the demo [2]. The Homoiconic parts of Mathematica are hidden behind more traditional syntax. Use the FullForm[...] function to see the Lispiness leak through. I suggest exploring the Rules & Patterns documentation [3] to get a feel for a non-macro approach to homoiconic transformations. Rules & Patterns makeup a rewrite system, which are strictly more complex than macro systems, but often easier to grasp during initial exposure.

[1] http://c2.com/cgi/wiki?HomoiconicLanguages

[2] http://www.wolfram.com/mathematica/trial/

[3] http://reference.wolfram.com/mathematica/guide/RulesAndPatte...



>Common Lisp & Scheme encode maps, sets, etc in terms of lists.

What do you mean by this? You do know that I can write some reader macros to get the same syntactic sugar for dictionaries and vectors as in Clojure, right?


Of course you can, but almost no one does. If people started to do it a lot, it would be just as interesting as it is with Clojure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: