ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "charles_loboz" <charles_lo...@hotmail.com>
Subject 'programming' extensions to ant discussion
Date Fri, 24 May 2002 05:45:02 GMT
1. Things like <foreach> are popping up frequently in the list of requests and are (rightly
imho) rejected by Ant designers. We have a conflict: the functionality is needed but we don't
want Ant to became a programming language.

2. It may possible to resolve this conflict. By 'programming' constructs most people mean
'imperative' programming - which conflicts with Ant/make _declarative_ style. The question
is: how can we expand declarative style to provide the _functionality_ without introducing
programming.

3. I do not propose any solutions, but a general direction. Ant frequently deals with _sets_
of objects - be it patterns, filesets, dirsets, properties... Let's generalize it a bit -
introduce a _list_ (set) as the basic 'type'. Each task can then assume that it's argument(s)
is a list (possibly length one or zero) of objects. So, each task can then be used to process
one or more objects. With some general build-in operations on lists (like filtering) we can
obtain very declarative build patterns using very regular approach. 

4. Admittedly, this is a shameful rip-off from Haskell or Scheme. This is not a proposal to
implement Scheme in Ant :-) , but use concepts from more declarative world to regularize many
Ant's tasks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message