On Thu, Dec 07, 2000 at 10:27:46PM +1100, Conor MacNeill wrote:
> Duncan,
> 
> 
> System.properties is limited to strings by its nature. You can't store
> more complex types so, of course, you need to use some context to
> interpret the meaning. Ant is not (anymore) limited to just string
> types. A number of other types have been introduced (paths, filesets,
> etc) and it seems illogical to treat the string type in a different way.

However, ResourceBundles, which provide a /slightly/ better management
of properties (I have my own gripes about them as well), do allow
non-string types. ResourceBundles are also hierachical which is nice
for providing scoping semantics.

I'm not saying that this is what should be done, necessarily, but the
good parts of the ResourceBundle architecture should be considered
when changing or redesigining the Ant properties management.

For what it's worth, I'm in favor of providing for non-string type
*support* for property expansion. I emphasize "support" because I
think the architecture should support/accomidate for it, but the
feature shouldn't be exposed until the build file defintion sytax and
semantics have been well defined. In the short term everything should
have "toString()" called on it.

I also think that converting null to
the empty string is the right behavior, not throwing an exception. If
there is a typeo they can run in verbose mode and debug the settings.

> 
> But we can do better. If we can catch user mistakes, we should. I still
> feel that implicit declaration of properties is bad.

I agree that we should help the user find bugs, but not at the expense
of making it difficult for normal use (i.e. makeing people define all
used properties). I think an apropriate compromise is to enable a
feature in verbose mode whereby a warning is issued in cases where an
undefined property is referenced.


sim


=====
Mustard Seed Software
mailto:[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Reply via email to