ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: override
Date Fri, 08 Aug 2003 18:02:02 GMT
> From: Costin Manolache []
> Nicola Ken Barozzi wrote:
> >> Yes, most build files have a target named "build" - but I 
> don't know why
> >> would you think about inheritance and OO instead of just 
> qualified names.
> >> 
> >> I don't know _any_ programming language where import is used for
> >> inheritance.
> > 
> > Well, I pointed out xslt, what about that? ;-)
> I know. Well, the behavior for properties in ant is inspired 
> from XSLT as
> well. 
> But I don't think the import in XSLT is intended as an OO 
> construct. Many
> people don't think XSLT is a very good as a programming 
> language ( even
> if you can do a lot of logic in XSLT ). 

>From the XSLT bible by Michael Kay (2nd edition page 232):
"Like inheritance un object-oriented languajes, <xsl:import> is designed
to allow the creation of a library or reusable components, only in this case, 
the components are modules of stylesheets. And the mechanism works in a very 
similar way to inheritance".

My understanding is that we wanted <import/> to allow us to define
modules of <targets/>.

You should read the full text of that page, I think a lot of what they want to
acomplish in XSLT matches what I think, we need to acomplish in ANT,
not sure is the way is done is the best for ANT, and they definetly go
deeper than just stylesheet overriding (precedence) they override all
kinds of things. Many do not apply to us, but others may.

> > As has been pointed out in these threads, Ant is a 
> different beast, and
> > should be treated differenty.
> +1

Maybe that is true, but to me the important thing is the goal
of writing effective reusable code.

> >> And if people need an OO feature for ant - that's fine, 
> they can add
> >> special tasks ( <exted>, <override>, etc ).
> > 
> > Hey, that's what we are talking about! IOW, what should Ant 
> give me to
> > get the features I want?
> > 
> > <include> ok, already decided
> > <override> ok, already decided
> > <import> ?
> If include is already decided, then skip import. 
> Add "extends" or something like that. 

Changing the name does not deal with the ussues.
Names are the least of our problems.

> I'm not concerned with override-target - only with import and 
> the resolution
> of name conflicts. 
> If people want to replace targets - great, but it's not my 
> use case :-) A
> clean import is what I need.
<include/> you mean :-)

Jose Alberto

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message