On 18 Jan, 2011, at 15:34 , Tim Daly wrote:

>> 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.
> 
> Well you could use scalac and dynamically load the class.
> Or, since it is Java, just create a classloader and load anything.

My understanding of the article is that the DSLs are compiled to something that 
may or may not be JVM bytecode (one example compiles to C++) and that the DSL 
code doesn't "know" that its compiler is written in Scala. A programmer who 
does know may resort to tricks such as you describe, but it is a lot 
straightforward than accessing clojure.core in Clojure.

> Safety, in my interpretation, means not using anything but the
> domain-specific language for portability. That won't stop people

Personally I fully agree. I just wonder if everyone else does.

> I do think that the idea of defining problems in terms of a DSL is
> certainly an interesting design approach. It might be useful to have
> some Clojure examples of such designs so we can ensure that
> DSLs are easily created. One really useful example might be to
> create Scala in macros :-)

I'd go for Fortran ;-)

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