The homoiconic thing is not all it is made up to be. That is, you can take (say) Java and parse it to an abstract syntax tree and the manipulate the tree.
Assuming you have a good toolbox of operators, working with that kind of AST is not much harder than working with s expressions. Maybe it is easier if you can build a general notation that can be generalized for multiple languages and also represent more ordinary data such as json formatted, relational, rdf, etc.
I couldn't disagree more. Working with that kind of AST is many orders of magnitude harder than Lisp macros. None of it is first class. You brush over it in your comment like writing a Java parser is trivial. My clojure parser returning the AST in its entirety is: (read-string (slurp "my-source.clj")). What does your Java one look like?
The proof that it is so much harder is that no one ever does it. Yet people do this all the time in Lisps. If its "not much harder" I'd expect to see more of it, but I don't, because it is just so much work.
Aside from parsing, what about templating. Yes, you can manipulate the AST once you have it, but what would templating AST look like? Would it look just like the Java code? With the syntax quote in clojure it looks very much like the output. How would you even begin to template syntax in your hypothetical Java implementation?
1. I am not writing a parser, one already exists and can be brought in about as easy as your code sample.
2. I am translating the AST to rdf which lets me work on the AST with production rules
3. If I wanted templates I would use templates. What I do do is start out with an abstract representation and then apply say 20 simple transformations that step by step fill in the details to get to code. Speed is OK because we have indexes, rete networks and other tricks.
4. People are not doing it yet and this is why people are saying code reuse is hard, etc.
5. The transformations are written in a sparql derived rule format that itself uses the transformation system to add features by composition.
I feel like you are being disingenuous. Do you have any experience with Lisp macros? Please enlighten me. Show me how you parse Java, into rdf, and then into AST in one line. And a link to this "already existing" parser would be great. Also, can you link me to some examples of this sparql derived rule format so I can compare.
although we've done a bit to humanize the syntax and try to add back some of the features that were common in production rules engines back to the 1970s.
Assuming you have a good toolbox of operators, working with that kind of AST is not much harder than working with s expressions. Maybe it is easier if you can build a general notation that can be generalized for multiple languages and also represent more ordinary data such as json formatted, relational, rdf, etc.