ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siberski, Wolf" <>
Subject RE: Requirements for Ant 2.0
Date Fri, 23 Mar 2001 12:02:12 GMT
Deryk Sinotte wrote:
>    2) Targets need to be considered more as "methods".
>    3) Flow control is the second biggest problem after scoping.
>    4) Data types need to be more powerful.

What You suggest would turn Ant into a full-fledged procedural
programming language. As IMHO we already have enough languages
of this kind, I thought about another way to exploit them
instead of inventing a new one:

If it would be really simple and straightforward to write a 
task that can call other tasks in the form of method calls,
then everyone needing procedural elements could code them
in Java. No need anymore to invent the 1001th procedural
programming language.

Instead of writing
  <foreach ...>
    <if ...>
      <javac .../>
You would write
  MyCompileTask extends ProceduralTask{
      for( ...)
        if (...)
          execute("javac", ....);

The advantage of this solution is that we could
focus on a declarative approach in the new core
while opening the room for complex logic which may
be easier to express in a procedural way.

Note that this approach allows procedural logic on 
task level, not on target level. Therefore we
could cope with target dependency calculation etc. 
without needing to take procedural logic into 
account which is a good thing IMHO.


View raw message