I am aware of edn-java; it has a very different scope than this library. 
edn-java is basically a pure Java implementation of an Edn parser, and it 
exposes the parsed data as mutable, untyped Java collections (e.g. an Edn 
map becomes a java.util.HashMap<?, ?>). I wanted to bring Clojure's entire 
data *philosophy *to Java: not just Edn, but also immutable persistent 
collections, metadata, and generic manipulation using functions like 
clojure.data/diff and clojure.core/merge.

At the same time, I wanted a way to put a typed facade in front of Clojure 
data, in order to prevent a lot of awkward unidiomatic downcasting; I also 
wanted a way for users to be able to validate, as a separate step, that 
these types are correct, instead of just getting a ClassCastException or 
NullPointerException further down the line. So you might say that I'm not 
just trying to replace JSON; I'm also trying to replace JavaBeans (or 
POJO's, or DTO's, or whatever you call them). Edn is a lot better than 
JSON, but Clojure data is *unbelievably *superior to traditional JavaBeans.

You raise an interesting point about the relationship between tree-shaking 
and security. There is one place in the library where I'm using eval; I 
need it for defmethod, because the only alternative I'm aware of is 
MultiFn, which is an implementation detail. Were it not for that, it would 
be nice if dynamic-object could ship with a stripped-down version of 
Clojure that could avoid the entire security discussion.

On Thursday, June 26, 2014 9:16:17 AM UTC-7, Mikera wrote:
>
> I think this is a great idea and I certainly support this effort.
>
> One thought that springs to mind is that it would be nice to be able to 
> use the Clojure interfaces and  data structures in Java *without* pulling 
> in the whole of Clojure as a dependency. Clojure is a bit of a heavyweight 
> dependency (with non-trivial load time impact?) and it would certainly be 
> easier to sneak the data structures into a Java project if it were a 
> slimmer dependency. This would also avoid concerns about security / risk of 
> "eval" functionality etc.
>
> Also - I assume you are familiar with edn-java (
> https://github.com/bpsm/edn-java)? It would be good to make sure your 
> work is aligned with this....
>
> On Thursday, 26 June 2014 07:08:50 UTC+1, Ryan Schmitt wrote:
>>
>> I've published the first releases of dynamic-object to Maven. 
>> dynamic-object (https://github.com/rschmitt/dynamic-object) is an effort 
>> to bring the flexibility and power of Clojure data and the Edn data 
>> language to Java developers in the most direct way possible. This library 
>> is intended to serve Neal Ford's Master Plan for Clojure Enterprise 
>> Mindshare Domination <https://www.youtube.com/watch?v=2WLgzCkhN2g>, 
>> which is based on the observation that dominant technologies often got 
>> their start by sneaking into the enterprise in a grassroots way. Rich 
>> Hickey stated 
>> <https://www.youtube.com/watch?feature=player_detailpage&v=I5iNUtrYQSM#t=3613>
>>  
>> that he would like Clojure data to be one of those "roots," and 
>> dynamic-object is all about making that happen.
>>
>> I'd love to hear any feedback or questions from anyone who finds this 
>> idea interesting. I'm sure a lot of us have one foot in the Clojure world 
>> and one foot in the Java world, and I'm sure the Clojure foot is happier 
>> than the Java foot. My hope is that by building bridges from Clojure to 
>> Java, we can take some of the pain out of Java development (in the short 
>> term) and make Clojure's ideas, and its jar file 
>> <https://www.youtube.com/watch?feature=player_detailpage&v=2WLgzCkhN2g#t=1226>,
>>  
>> much more widespread (in the long term).
>>
>

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