ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: presetdef vs. macrodef
Date Fri, 30 Jan 2004 22:17:58 GMT
> From: Dominique Devienne []
> > From: Stirling, Scott []
> > I sort of get some of the differences between <presetdef> and
> <macrodef>,
> > but I don't understand the motivation behind <presetdef>.  Can anyone
> > explain why <presetdef> exists when we have <macrodef>?  It seems like
> > they overlap, if <macrodef> doesn't actually subsume everything that
> > <presetdef> can do.  Not knowing how the two came into existence, I
> don't
> > understand the motivation, and am unsure why/when I should use
> > <presetdef>.
> I asked this same question some time ago, and although I don't remember
> the full answer, one difference is that <presetdef> still gives you access
> to all the attributes/elements of the 'decorated' task, while with
> <macrodef>, you define yourself which attributes/elements the new macro
> accepts, irrelevant of what the tasks used by the macro accept.

Kind of like the different between inheritance (presetdef) and
composition (macrodef), one could say... Stretching things a bit ;-) --DD

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

View raw message