XML::SAX::Machines::Pipeline and XML::Filter::BufferText to Java. Boy, life's hard when you don't have AUTOLOAD. Here's a sample from the new fr.expway.sax.filters.BufferText:
public void startElement (String ns, String ln, String qn, Attributes attrs) throws SAXException {
sendChars();
getContentHandler().startElement(ns, ln, qn, attrs);
}
public void endElement (String ns, String ln, String qn) throws SAXException {
sendChars();
getContentHandler().endElement(ns, ln, qn);
}
public void processingInstruction (String tgt, String data) throws SAXException {
sendChars();
getContentHandler().processingInstruction(tgt, data);
}
...
And it just goes on and on... talk about the DRY Principle in action. Compare that with the original. Java is generally anti-DRY, with constructors having the name of the class and other stupidities like Foo foo = new Foo() but I rarely felt it this strongly.
Similarly, in order to make Pipelines work naturally (whereby you can pass in objects or class names), I had to defeat the type system with lovely constructors like new Pipeline(new Object[]{foo, "myClass"?,
I am deliberately not releasing this as Open Source. If anyone uses this language for reasons other than commercial, they deserve the pain.
Ugh. (Score:2)
If you need to be using Java, can't you use something like a JScheme, Jython or JRuby to run code within the JVM?
Re:Ugh. (Score:2)
Re:Ugh. (Score:2)
If you need to be using Java, can't you use something like a JScheme, Jython or JRuby to run code within the JVM?
I wish, but unfortunately the reason I'm using Java is because I'm doing research stuff, and Java is pretty much the lingua franca. A lot of people think it has serious flaws, but it's the only thing you can use that you're sure all others will understand.
I guess we better get up to speed with those taking over of the world with Perl6/Parrot ideas ;)
-- Robin Berjon [berjon.com]