ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: Configure->Template->Build
Date Thu, 07 Jun 2001 15:34:39 GMT
> From: Roger Vaughn []
> > True - but I am fairly sure that we already knew
> > that (at least to a
> > degree). Currently ant specifies a sequence of
> > operations. We add in
> > repetition (ie foreach) and selection (ie if) then
> > we have just invented an
> > XML programming language ;) Something that was a
> > declared non-goal of ant.
> Bingo!  You nailed it on the nose but missed a
> critical point.  Ant already IS a programming
> language.  It's not a mainstream procedural language,
> but it is a language, with the express purpose of
> controlling build ops.  And as we well know from
> experience with other languages, sequences of
> operations frequently need iteration and conditional
> execution.  That is, unless you want to model the
> language after Prolog, etc.  ;-)

Well, as the Prolog guy I was, I can tell you that even though you may not
have constructs that look like "if" and "for/while" loops. You not only can
do both in Prolog, but they are the some of the basic operations in the
language. We call them "pattern matching" and "tail recursion", extremely
efficient for the power they provide.

I have no problem with adding some way to do iterations to ANT. As long it
is based a a well defined *declarative* principle, I am all for it. By a
declarative principle I mean a principle that does not depend on execusion
order or side effects. One that we could execute *secuentially* (as a loop)
or all in *parallel* if/when possible.

Filesets, for example, provide such declarative definition. We could imaging
other similar constructs.

I could even support having this at task level, in which the iterated value
is applied to a particular attribute on each terated instance of the task.

	<taskXYZ ... > <!-- This task has an attribute called "foo" -->
	  <for name="foo" >
          <fileset .....>

Or something like that. Which can be executed sequentially, or in parallel
or whatever.

Jose Alberto

> roger
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!

View raw message