ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: <available> / <condition> breaking immutability
Date Tue, 27 Nov 2001 19:59:21 GMT
From: "Bruce Atherton" <bruce@callenish.com>

> At 01:36 PM 11/27/2001 +1000, Robert Watkins wrote:
> 
> >Even using <tstamp>, you could still achieve the same effect with immutable
> >properties simply by using a different property each time.
> 
> Either of these solutions will work, but only by adding unnecessary 
> complexity for the user. And why? Because you are trying to keep your 
> conceptual view of what a "Property" is as straightforward as possible in 
> the design.
> 

I do not think why it needs to be more complex to use. I think we can find a
solution to the issue by providing a simpler alternative to the <format> subelement
which I would agree it is a little too much. For example we could allow the following:

    <tstamp prefix="pre" />

which will define (if not yet defined) properties "pre.DSTAMP", "pre.TSTAMP" and
"pre.TODAY". Without the prefix argument the code would use the properties they
use today. In any case, if the properties are already set it would live them alone
and show a warning.

This is as simple as one can get and keeps the semantics of properties as inmutable.

> A design should be as simple as possible, but no simpler. When the tradeoff 
> is between elegance of design and ease of use for the user, I'm thinking 
> you are going for too simple.
> 

I have to say that <tstamp> is probably one of the oldest tasks in ANT from before
anyone had really fix what the semantics of ANT was supose to be. That, I think, was
part of the reasons why <tstamp> has the funny behaviour it has.

I think part of the problem here is that we have not been as rigorous as we should have
on applying our own inmutability rules to our own core tasks. Of course the fact
that we have left APIs open that allow people to write code that violates the rules
is no confort.

We need to clean house!

Jose Alberto



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message