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

I like the idea of React.js and immutable data. But i'm not a fan of the lisp syntax, am i missing something?


I used to have an issue with lisp syntax until someone pointed it out to me like this.

In c and java like languages, you invoke a function like this: f(x)

In lisp, just move the paren before the function name. What's the big deal? (f x)

Similarly, f(g(x)) becomes (f (g x)). All we did was move the paren before the function name.

The syntax is extremely consistent and it makes the lisp syntax trivial to learn. In nearly everything you do, the function name comes first the arguments come next. (+ 1 2) Here + is a function, and you are giving it 2 arguments. There are no special operators or syntax to learn. Just functions!

The mind blowing part comes when you realize that this consistent syntax combined with the fact that the code is really just written in lisp datastructures, is what makes lisp macros so powerful.


Interesting, that does provide a highly consistent base as you say. I might just have to try out Closure with Om/React for my next project.




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

Search: