Thanks for all of your answers, but I think for my use cases the
approach proposed by Justin looks most promising. I'll implement my
own closed map.

Another idea that come to my mind was that a closed map is actually a
Java Bean without behaviour. Perhaps the closed map could be
implemented by dynamically creating an immutable bean at run-time
somehow along the lines of this article:
http://blogs.sun.com/adventures/entry/dynamic_java_beans

The advantage would be that other JVM languages could more easily take
advantage of such objects, e.g. rule engines like drools or complex
even processing engines like esper.

Are there any disadvantages you would see?

I would imagine that clojure's compiler already has most of what is
needed for such an approach. Could somebody give me a good entry point
where to start my analysis of the clojure internals to create
dynamically beans at runtime?

In the past clojure seems to have had a gen-and-load-class feature,
which disappeared. I could not find references that would explain the
reasons why it was taken out.
The following post from 2008 basically would already do what I have in
mind but it uses the gen-and-load-class feature:
http://groups.google.com/group/clojure/browse_thread/thread/79e4cb66a05c8ce9

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