ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Ant2 and properties
Date Mon, 18 Dec 2000 04:55:05 GMT
At 08:51  17/12/00 -0800, James Duncan Davidson wrote:
>On 12/4/00 5:30 AM, "Conor MacNeill" <> wrote:
>> I certainly support unifying properties and the other datatypes. I had
>> originally just seen this as making property a string datatype, using
>> the same namespace and passing to subprojects, etc. What you are
>> suggesting above is a little different. With the above we would probably
>> have an explicit string datatype.
>As I was just saying to Conor offline -- I think I might be able to go for:
><property name="foo" value="bar/foo.html" type="java.lang.File"/>
>Where the property hashtable was a name->object mapping and the default
>object type was String. If some other type were specified, then that type
>would be constructed with a String constructor taking the value as the
>String passed to the constructor.
>${foo} is satisfied by getProperty("foo").toString();

Are you sure thats wise. That could end up with large number of conversions
and large amounts of uneeded verbosity. COnsider the average case

<property name="dist.base" value="dist" type="java.lang.File"/>
<property name="dist.lib" value="${dist.base}/lib" type="java.lang.File"/>

<mkdir dir="${dist.lib}" />

That would involve 5 different conversions - and considering that file
properties are usually used as file parameters the conversions could be
greatly  decreased and simplified if conversion wasn't mandatory.



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message