ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@eng.sun.com
Subject Re: Tasks containing other tasks (was: Subtasks within tasks)
Date Fri, 25 Feb 2000 08:03:10 GMT
> <switch name="os.name">
> 	<case value="Mac OS">
> 		<javac ..... />
> 	</case>
> 	<case value="Win*">
> 		<javac ..... />
> 	</case>
> 	<deafult>
> 		<Deltree ..... />
> 	</default>
> </switch>

I was afraid of that....

I think we should split the problem in 2:

1. How to deal with the case of 
    <foo>
       <bar>
    </foo>
Where we can't have createBar() ( because we want foo to support dynamic 
sub-elements, including elements defined at runtime with taskdef ).

In your particular case, having foo implement an interface will work and
it's a good solution, but I was thinking at the general case, when the
child doens't have to be a task - this is not the only situation when you
need a dynamic sub-element. 

2. <case>, <macro>, etc. We need a lot of thinking before adding such
thing in ant. The reason I asked "what is a sub-task/ task container"
is simple - what you want is not a simple "patch" or incremental change,
but a radical change in the ant architecture and idea. 

Ant is not a programming language, and adding if and loop will make it a
PL ( by Turing machine def). It's nothing wrong with inventing a new PL,
it's just that many people like ant because it's simple and not yet
another PL.

I think both are very serious design issues, and I think we should wait
and have a general agreement before adding them ( I'm -1 on both ). 

Costin






Mime
View raw message