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

The reason I end up with Python, CoffeeScript or Ruby and not a Lisp is the prefix notation and the parentheses.

The parentheses can decrease readability and the prefix math expressions can make the order in which you think up a solution awkward.

http://sourceforge.net/p/readable/wiki/Problem/

http://cs.brown.edu/~sk/Publications/Papers/Published/mfk-va...



The benefits of lisp 'syntax' are legion, to the point that I've come to feel that your position is unprofessional. Why wouldn't you try to get passed something as superficial as syntax, in order to better _make_ stuff?

1) Easier to learn and remember syntax for polyglots. No more Googling, shit like "what was the syntax for try-with-resources or the new multi-catch feature in java"?

2) The language tooling is so much easier to get right. The parser for Ruby is 10k lines. What the actual fuck? How can you expect people to make good tools if they can't get past the parse step?

3) Macros!

4) No fucking precedence rules. I don't want to memorize that the precedence for 'and' and && is different in Ruby and how 'and' interacts with the precedence of other operators like assignment.

5) Structural editing.

I might have forgotten a few, but 2) and 3) alone are killer features.


Julia [1] has 3 and 5, and almost 1 (it has very few built-in syntax sugars and a uniform way of invoking macros). It's targeted at scientists, so 4 is not an option, as infix syntax is a hard requirement for mathematics.

[1] http://julialang.org/

Edit: Elixir [2] is homoiconic as well, with even more uniform syntax (though it doesn't have special matrix syntax).

[2] http://elixir-lang.org/


Elixir is not homoiconic. They used to claim that based on a very unusual definition of homoiconicity, but they have removed those claims from their materials.


But Julia is, or not? If yes, why? (The only difference, as far as I can see, is that Julia AST is considerably simpler than Elixir's (a Julia struct with 3 fields, only two of which need to be present: head and args). Though admittedly, that counts a lot.


+1 for Elixir, really excited about it. Especially knowing it is built (like Clojure) on a very solid battle tested VM.


I have done quite a bit of Python hacking, as well as Javascript and Ruby. You really do get over the parentheses thing. In fact it more or less becomes a non-issue after a few days. It just is not something that should make you decide against a language.

The only time it becomes a major issue is if you are nesting many functions, but in that case the threading function is both utilized often and quite elegant.

Instead of:

    (fun3 (fun2 (fun 1 "string")))

    (-> "string" fun1 fun2 fun3)


I'd argue they're only "awkward" because you aren't used to them.


I don't know about Clojure, but you can usually use an infix reader in common lisp to get around that.

What's more, because one can macroexpand on the fly, you can actually see the code that it transforms into.




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

Search: