2013-12-20 21:42 GMT+01:00 Alan Dipert <a...@dipert.org>:

>
>
>
> The result, in my opinion, is mindblowingly beautiful and extremely
> powerful.  By making the DOM a Lisp - and not just any Lisp, ClojureScript
> - we have a means to *real* DOM component modularity.  The exact same
> modularity that you get with things like namespaces and closures.  Where
> various other HTML component systems drag in their own reference types and
> scoping rules and evaluation semantics,  we have just ClojureScript's usual
> rules.  That's because, via the IFn protocol, it's possible for us to make
> DOM elements invokable.  As implementers of IFn, hlisp-generated DOM nodes
> can participate fully in the ClojureScript world without introducing new
> scoping constructs or DOM-specific composition rules.  As a result of all
> this, we have no need to represent HTML anywhere as data.  Everything is a
> program, and expressions in this program may evaluate to DOM.  There are no
> templates, just expressions.  I encourage you to check out our "Getting
> Started" page to see just how powerful functional composition can be when
> applied over Lispified DOM nodes.
>

Maybe I'm off track here, but this resounds to me as similar to the
arguments that I listened to in lecture 2a of the SICP course.

In that lecture, they introduce the representation and manipulation of
pictures.

They introduce a single primitive and then build on top of that.

They create a dsl specific to pictures processing that is  "embedded" into
lisp.

So it inherits from lisp the common means of expression (abstraction,
combination, recursion and whatnot)

I see a sort of kinship, here, between DOM elements and SICP pictures.

In fact, they stress that "data" representing pictures are the same kind of
lisp citizens we already knew. Data are blurred with the language, in lisp.

In the DOM case macros are necessary because there's the html to deal with.

So I guess that the solution is to use the macros to end up with lisp stuff
and then work with that, rather than the other way around.

I hope I didn't make myself a fool, here

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to