ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Murdoch <>
Subject Re: [myrmidon] -ref vs ${}
Date Sun, 07 Apr 2002 11:04:44 GMT
On Sun, 7 Apr 2002 20:02, Jose Alberto Fernandez wrote:

> > I just wanted to get peoples opinion on something I been playing with.
> > Currently in myrmidon the followin attributes will get identical values
> >
> > myAttribute="${value}"
> > myAttribute-ref="value"
> To me it all depends on the meaning of "${value}". The way I see it
> "${value}" corresponds to the string representation of "value". I say this,
> because it should not matter whether I pass "${value}" or "${value} is a
> value" the ${} operator should behave the same.

Perhaps some background might be useful.  In myrmidon, properties are treated 
as objects, rather than as strings.  A property value may be a string, or a 
fileset, or a command-line, or whatever.  This changes the meaning of ${prop} 
and myAttribute="${prop}" from ant1:

${prop} evaluates to the value of the property, rather than the string 
representation of the value.  

myAttribute="${prop}" sets the attribute with the value of the property, 
without converting to a string, and back again.  If the value is not of the 
expected type, myrmidon attempts to convert the value directly to the 
expected type (without the intermediate convert-to-string step).

Given this, the "-ref" form becomes a bit superfluous.  Of course, we don't  
know that 'all properties are objects' is a good way for things to work yet, 
but so far it seems an improvement over the all-strings approach of ant1.


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

View raw message