Why i am loving Clojure - a Lisp Dialect ?

I am learning clojure now and this is such a cool ride so far.

There are many things that blow my head away but this is something that looks so cool :

1. The code is data :)

    I would explain it. List in clojure is represented as
    Loading ....

   and code as
   Loading ....
  
   i hope you can see the similarity..

   If not.. here are the hints ..
  •     The code is data,
  •     The code is list only.
  •     A list contains data.
2. I write S-Expressions...

     You might have heard many bloggers saying that they write S-Expressions for the living..
     Now that is true.. All this lisp or clojure code is nothing but a tree of nodes.. 
    To quote the wikipedia :

     "In computing, s-expressions, sexprs or sexps (for "symbolic expression") are a notation for nested list (tree-structured) data, invented for and popularized by the programming language Lisp, which uses them for source code as well as data. In the usual parenthesized syntax of Lisp, an s-expression is classically defined[1] inductively as
  1. an atom, or
  2. an expression of the form (x . y) where x and y are s-expressions."

  
Other languages do have list and trees.. but those being part of philosophy of the language makes the language more pure.

3. And here is another why:
    Programs with variables referring to variables is like building house on sand...

   I watched this video and i got some punches : Value-Identity-State

"There is no notation of time in functions.

If you give same question twice at different time, and you get different answers, then you have state.

Why do we need variables if we do not have the notion of time...
if we can not go back and see the previous value of variable why it is a variable.

You want to be working with values but not with the variables.
"






Comments