3 comments

[ 1249 ms ] story [ 640 ms ] thread
I have been making something like this for Java which manages to mostly play OK with the type system, at least for expression trees.
You mean without marking all the atoms as "object"? Clojure is written in Java and is dynamically typed. I experimented with statically typed linked-lists in Saccharin https://github.com/gilch/saccharin but ran into the limitations of Java's type system at the time. I couldn't figure out how to do certain list operations without losing the types.
My project is more "write Java expression trees, methods, etc. with lispy syntax" as opposed to "implement lisp directly in Java".

Thus car-cdr lists are not central to the project, but the only foreign dependency it uses so far is a persistent collections library and probably I am going to have it run the code generator so I can write "lisp style" Java with persistent collections.

You know you can write things like

   Empty().and(33).and(122).and(75)
and avoid some of the type erasure trouble.