ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Vaughn <>
Subject RE: executing task for each file in file set
Date Tue, 12 Jun 2001 00:56:31 GMT
--- Peter  Vogel <> wrote:
> I guess my point is that "bad practices" will happen, no matter what
> you do to prevent them.  In Ant's case, it's way to possible to commit
> a multitude of sins in a series of optional tasks that unnecessarily bloat
> the 
> "vocabulary" of build description when it would be better to have a more
> limited set of useful words in the core (i.e. foreach, if, etc.) I challenge
> you to describe what a number of core and/or official optional tasks
> do without using the words for, each and if.  It's a natural part of the
> build process.

I have to agree.  I would add that "bad practices" are a natural part of the
learning process, too.  Trying to protect developers from "bad practices" is,
at best, futile, and at worst, counterproductive, since it can short-circuit
the learning process.  (No, I'm not advocating the use of bad practices, just
saying they happen. :) )

Another undesireable effect of "protecting developers from themselves" is that
it prevents those of us who can (and need to) use these "advanced" features
productively from having access to them.

I'm 100% behind keeping the language accessible and easy-to-use, but I don't
feel that's what we're talking about.  We seem to be discussing not whether
iteration and conditionals are "easy to use", but rather whether they are "safe
to use".  I don't believe that the core committers should be making that call
for *everyone* in the field.

> You, Stefan, are actually one of the bastions of reasonableness on this
> list...


> > Say we'd add foreach to the core - and I'm more and more leaning
> > towards it (making myself a heretic, I guess 8-) - and we already have
> > those many cases where we successfully anticipated the need for
> > iterations like javac, execon, apply and in the future anton, javaon.
> > What can we do to make user chose the "right" thing?

Now, here I see the start of a disturbing trend.  I have just recently noticed
this one.

First we had <exec>.  Then came <execon>, i.e. exec for each member of a
fileset.  Now we see anton, javaon, etc. in the future.  But is this the start
of a trend: exec/execon, ant/anton, chmod/chmodon, delete/deleteon,
echo/echoon, etc.?  (Yes, I know some of these deal with filesets natively -
I'm simply making a point.)

Are we now going to have individual and iterating versions of every task?

It would seem to make far more sense to me to extract the iteration code into
its own construct, and keep the individual tasks pure.  This would seem to
involve far less code, simpler maintenance, and more flexibility in the build

Yes, it's possible to abuse the construct.  Honestly, though, in my make days,
I saw far worse *deliberate* abuses - hell, I wrote many of them - in order to
work around missing features such as this.  IMHO, this is why make was so hard
to use, and why so many people were scared of it - because of limited basic
features we often had to think up and resort to nasty tricks to get simple jobs


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

View raw message