ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: executing task for each file in file set
Date Thu, 14 Jun 2001 03:49:57 GMT

From: Peter Vogel [mailto:pvogel@arsin.com]

> I guess my point is that "bad practices" will happen, no matter what
> you do to prevent them.  

> > You've said more than once, that the common "recursive makefile"
> > pattern found almost everywhere in the make world was bad, even when
> > applied to make.  This means, that there are other, better ways to
> > manage complicated builds in make, but for some reason, most users
> > choose the inferior solution.
> 
> It's a side-effect of a self-replicating pattern.  Early make 
> tools lacked
> the power necessary to avoid recursion, so that's what people 
> did.  When
> the more powerful tools (the include directive in many modern 
> make tools) 
> became available and made the recursive pattern obsolete, few people
> noticed...
> 
> The non-recursive makefile pattern also takes a few minutes 
> to wrap your
> head around if you are used to the recursive pattern.

I think those points are reasons to be careful with the addition of 
things like foreach.

Recursive make was a bad solution to a real problem.
The feature itself isn't particularly bad, I think that recursion
is pretty much required for "make world".

However by providing a feature that should have been of very 
specialised use, as a solution for a common problem, bad habits
were set, and now can't be broken.

I accept that there is a real need for iteration (I submited one
of the tasks for it), but I also think that everytime someone
wants it, we need to ask whether this is using the wrong
tool for the problem.

There are only a relatively small number of cases where a
foreach task is needed (most tasks should, IMHO, handle sets
natively) and we need to make sure that all the problems people
want ant to solve, are solved in the best possible way.


Mime
View raw message