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

I'm still not sold on Clojure because of the syntax aesthetics but this is a surprisingly mature and complete project. Looks like it's been in active development for 8 months now.


Lisp syntax has always been a complain for new programmers that approach the language(s). But as I experienced myself, syntax is just syntax. Once you learn it, it does not matter anymore.

It's like learning a foreign language: it can have a (very) different syntax from yours and at first it can be difficult. But when you learn to speak the language fluently, it comes naturally.

I experienced this also in programing languages. I started programming in Pascal and then in C, for which the syntax is almost the same. Then I went to C++ and then Java. Both are Object Oriented languages, but they have some differences in their syntax as well. Still, no big difference.

When I started with Objective-C, though, the syntax was really confusing for me, even if it's an OO language. At first I was not able to understand even the sample code. But I was interested in it (for Mac development, iPhone did not exist yet) and now I find it more natural than Java (just because I am more accustomed to it since I use it every day, not because it's better).

So, when I learnt Lisp, I did not worry about syntax anymore. Sure, it's different, but we alwys have to learn new and different things anyway. Now I develop in Clojure and syntax is, again, not a problem.

EDIT: some spelling mistakes.


I don't want to start flame war on lisp syntax again, but you may find clojure syntax more usable/readable after installing proper plugins for managing lisp code. Personally (as an emacs user) use highlight-parentheses-mode (each level of nested parens gets a different colour) and paredit (provides closing paren for each new you open, helps with joining/splitting expresions). I know there are also similar plugins for vim and eclipse (I'm not sure about paredit here). I was actually surprised when I started using them how much they help me.


I started emacs with clojure too. Paredit reallly rocks and is really easy. Some paredit function are so useful that I use paredit for other languages to here is the chatcheat http://www.emacswiki.org/emacs/PareditCheatsheet.

Emacs has paredit or like 90% of it. Its written in clojure and you can use it as a library (https://github.com/laurentpetit/paredit.clj).

Im not sure about vim. It has nice rainbow parens (each level of nested parens gets a different colour).


I use VIM to code in Clojure. I don't have paredit [1] but I don't find it really necessary, I can live just with rainbow parentheses and paren-matching (not to say that I would not find it useful if I had it).

[1] When I set up my Vim for Clojure development I made some research and I never saw it mentioned anywhere, so I think it's not available.


I am pretty sure there is paredit-like mode for vim, because I actually used it for some time. It seems that it is part of slimv [1] now, however I recall using it without setting up slimv.

[1] http://www.vim.org/scripts/script.php?script_id=2531


Check out VimClojure http://www.theamericanscholar.org/the-disadvantages-of-an-el... comes with rainbow parens and some parts of paredit if I am not correct.


Ah, the Lisp syntax. For me a very simple rule seems to have "clicked it": parentheses around the whole call, not only arguments.

Interestingly, I picked up this rule when I got into OCaml. Then I got back to Lisp and suddenly it looked much more readable. YMMV.


Peter Seibel does a beautiful job in explaining lisp syntax and semantics in his book Practical Common Lisp: http://www.gigamonkeys.com/book/syntax-and-semantics.html




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

Search: