On 18 Jan 2011, at 07:37, Tim Daly wrote:

I have just finished
Language Virtualization for Heterogeneous Parallel Computing
http://infoscience.epfl.ch/record/148814/files/paper.pdf

Me too!

Clojure clearly fulfills all of the goals of a virtualization language
because it is a Lisp. Lisp systems are clearly capable of building
a DSL that is fully expressive of all of the power of Lisp. By using
the macro facility the DSL syntax can be matched to the problem
domain.

The authors do mention Lisp, saying that it satisfies most of their criteria except for safety, because a DSL implemented through Lisp macros always has access to all of Lisp, including the DSL's own implementation.

I suppose that for most Lispers, Clojure's namespaces are a sufficient answer. Just make a namespace for your DSL where you put all the stuff that is part of it. Sure, you can always get at the rest of Clojure by importing other namespaces and/or using qualified symbols. But you would do that only intentionally, not by accident.

People coming from statically-typed languages typically require more law enforcement and would probably not be happy with the namespace approach. More protection would require a DSL-specific reader that checks for namespace-qualified symbols and disallows arbitrary imports. But even that would probably be less work to implement than what it takes to make Scala "virtualizable".

However, I do believe that Scala has a better chance of being accepted as a DSL hosting language for "mass-market" parallel computing, because it has familiar syntax.

So I think that Clojure is an excellent virtualization language for DSLs.

I certainly agree with that.

Konrad.

--
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

Reply via email to