From: "Peter Donald" <[EMAIL PROTECTED]>

Pete, I never got to answer your question on this matter. I have been kind of 
overwelmed at work.

In any case, here I go:

> 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.

With that in mind, then 'myAttribute="${value}"' implies converting 'value' 
into its string representation
and then converting it back to the type specified for 'myAttribute'. You could 
try to optimize away 
such conversions, but it means that you cannot pass a subtype that way because 
by definition
it should behave like the value is being reconstructed from its string 
representation into that of the
type of the attribute.

'myAttribute-ref="value"' on the other hand should be passing a reference and 
as such if has a different behaviour.


> My question is do we need to support the "-ref" version of attribute 
> evaluation or is the first sfficient for all our use cases?
> 

In sumary:

    <sometype id='value' ....../>
    <sometask myAttribute='${value}'/>

should be indistinguisable from:

    <sometype id='value' ....../>
    <property name='prop' value='${value}'/>
    <sometask myAttribute='${prop}'/>

for all types. Otherwise your type-system would not seem to be well defined and 
you will finish
with future extrange behaviour.

Jose Alberto




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to