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.
3 comments
[ 1249 ms ] story [ 640 ms ] threadThus 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
and avoid some of the type erasure trouble.