ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: local properties
Date Thu, 21 Oct 2004 15:49:38 GMT
Not that I am giving up on my proposal or anything :-)

But since I think they both can coexist as tools for people to use as
they please,

How about structuring this local variables scope as follows:

  <propertyscope>
  
    <propertyscope>
      <property name="1" scope="local" value="A"/>
      <property name="2" scope="super" value="B"/>
      <property name="3" scope="global" value="C"/>
      <echo> ${1} ${2} ${3} </echo>
    </propertyscope>
    <echo> ${1} ${2} ${3} </echo>

  </propertyscope>
  <echo> ${1} ${2} ${3} </echo>


OUTPUT:

  A B C
  ${1} B C
  ${1} ${2} C

Default for "scope" is "global".

It is simple, it is clear to the programer what is he doing.
It allows passing to callers just some of the info. I.e a way to return
a value
without global effect. And it cover all the cases of prefix and such
by only modifying a couple of places.

Now, I still will fight until convinced the implementation does not
break
some BC assumption. :-P 

But what do you think? 

Problems:
You still need a way to shadow a property without defining it (maybe
scope="shadowed"?).

Jose Alberto

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


Mime
View raw message