ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Expansion in includes
Date Thu, 07 Dec 2000 11:27:46 GMT
Duncan,

> -----Original Message-----
> From: James Duncan Davidson [mailto:duncan@x180.net]
> Sent: Thursday, 7 December 2000 19:37
> To: ant-dev@jakarta.apache.org
> Subject: Re: Expansion in includes
>
>
> Same thing exists with System.properties. "fred" means very
> different things
> when it is the result of "user.dir" or "home.dir" or
> "user.name". Context
> matters. I really don't see this as complexity that I'm
> advocating. Adding a
> bunch of typing on top of this is complex afaic.
>

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.


> Filesets != properties. A property is a simple name=value
> pair. Filesets is
> a one-to-set mapping of files which may contain regexp patterns.

Well, currently a fileset can also be thought of as a name=value pair.
It can be created with a name (id) and can be referred to by that name
(refid). Sure that value has a more complex type than a simple string
but why should we have to manipulate it in ant build files in another
way. If we unify the handling of named values, we should make it more
logical and simpler.

> The same thing can happen in any data file.. A mistyped
> property key in a
> java.util.Properties list exhibits this behavior -- as does a mistyped
> attribute name in a XML file that isn't being validated
> against a DTD. This
> is not a problem that is unique to Ant, and yet we're fine
> with it in those
> cases.

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

Conor


Mime
View raw message