ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Duncan Davidson" <james.david...@eng.sun.com>
Subject Re: ANT semantics and power
Date Tue, 29 Feb 2000 00:52:19 GMT
> Init is running
> main is running
> null
> I've been inited

Actually -- I'd expect that neither case is correct. My feeling is that
properties defined in a target should be target local.

> Another possible solution is to move all property setting out of the
> targets.  This removes the expectation that it will be executed in 'target
> order'.  I gather from one of the recent posts that this is the way things
> once were and this might explain the current strange semantics.

Actually I beleive so. In fact my feeling is that properties are the
property of the project and do not belong, nor should be allowed, in
targets.

> Separate from <ForEach /> and the ability to add recursive tasks, do
people
> see changing the <property /> semantics in this way to be a good thing?

Yes, properties should be cleaned up. My instinct is to do like I stated
above. Make them belong to the project, and accessed via the project object.

>   I am intrigued by ANT being called a declarative language.
> <http://www.instantweb.com/~foldoc/foldoc.cgi?query=Declarative> defines a
> declarative language as follows:
>
> > A general term for a relational language or a functional language, as
> > opposed to an imperative language. Imperative (or procedural) languages
> > specify explicit sequences of steps to follow to produce a result, while
> > declarative languages describe relationships between variables in terms
> > of functions or inference rules and the language executor (interpreter
or
> > compiler) applies some fixed algorithm to these relations to produce a
> > result. The most common examples of declarative languages are logic
> > programming languages such as Prolog and functional languages like
> > Haskell.

Obviously, according to that definition, I'm misusing the term. I'm ok with
that. I'll start saying "Antfiles aren't supposed to contain code like
constructs" and stick with that.. :)

> I suspect it is this second definition that you are using.  I.e. you don't
> want ANT to become turing complete even if it is a functional language
> because then it would become hard to machine edit.

Nope. I don't want the Ant syntax to be complicated. Really, I don't care if
it matches whatever definitions of words.. I want it to be simple.

> I would like to be able to handle different operating systems.  Java is
not
> completely cross-platform, although it is close.  Being able to specify
> those last few bits in a build-file is very useful.

My thoughts on this for an exec task were along the lines of

<exec platform="Mac OS" command="foo" args="arg,arg,1">

So instead of a case statement, your example reduces down to 3 lines. All
logic in the tasks, more concise even.

> I'd now like to turn this question around.  What sort of machine
processing
> do you have, or forsee, that this breaks AND that isn't already broken?  A
> simple graphical editor that just allows you to add tasks and fill in
> attributes works just as well with these new tasks as with the old system.

I'm not quite sure where you are picking up a machine processing bias here.
My aim is to keep things simple.

.duncan



Mime
View raw message