« Charles Miller: penetration testing | Main | Alzheimer Oriented Architecture »

Compose yourself

Ken Arnold Critiques Ant

The problem with Ant is that it violates something we learned with Unix. Tasks aren't composable.

Two ways out of this problem.

1: Use piped i/o and interoperate via data not functions. That's what UNIX did and in Propylon that's exactly how we handle XML process/transform composition for our customers (with PropelX).

2: Use a language or protocol that supports functional compostion. Lisp or Scheme by modelling tasks are functions and HTTP by modelling tasks as state transition acheive this (though you could argue that HTTP is a very weird pipeline). And Python is close (as Ted point out).

Tasks aren't composable in UNIX due to C, and not composable in Ant due to Java. Of course you could design a task language to be composable and use C/Java to write the interpreter, but I think the result would look so much like Lisp, it'd be easier to cut to it and write a Lisp interpreter in C/Java instead.

As for Ant. Ken Arnold's observation isn't entirely fair. Ant was not designed to compose. If it's really a problem (and I'm not sure it is) Ant would need to be rebuilt using pipelines (most people are allergic to Lisp so functional composition is a non-starter). One thing to consider is migrating off Ant syntax by moving onto Python or Jython to script your build (keeping the Ant tasks tho') and the scripting language to compose calls or pipe data through them. To be honest I think this is a issue for languages like drools and Jelly rather than Ant. Ant is fine as long as you're not trying to program with it.

June 21, 2003 03:30 PM


Trackback Pings

TrackBack URL for this entry:

Listed below are links to weblogs that reference Compose yourself:

» ANT sucks from manAmplified
Compose yourself re-inforces my desire to explore using Ruby as a build tool.... [Read More]

Tracked on June 29, 2003 05:31 AM