> Hi,
>
> what I think about dash problem:
> - in writing xml element names (Nant tasks) is common to use dashes
Agreed.
> I see 2 possible way how to "enable" use of properties (and even
functions)
> with dash in name:
>
> A/ allow it on lexical level:
> So: <if test="${some-long-property - long-function(1)=42}"/> it means
> "prop - func(1)=42"
> but <if test="${some-long-property-long-function(1)=42}"/> it means
> "func(1)=42"
And assuming "a" and "b" are properties, what would be the result of:
"${a-b}" ??????
I don't understand why should it be different from ${a<SPACE>-<SPACE>b}.
Most languages let you place whitespaces around operators so disallowing
this wouldn't be convenient.
> B/ do some property name tweaking before EE run.
> e.g. to replace all "-" with "_"
> So u use:
> <property name="mine-property" value="42"/>
> <if test="${mine_property=42}">
>
> this is not so clean, but quite acceptable. In reality I use this
scenarion
> in mine proprietary [yet] scripting engine which use Python language
(Python
> do not enable dashes in variable names while i'm also in xml and there it
is
> common).
I don't like this approach at all, I think it does more harm than good.
> C/
> Of course, we could disallow dashes in property names as all but it will
> break alot builds I think...
I think that dashes in names should be disallowed or at least deprecated.
There's a function called: propertyvalue() that can be used to access such
properties.
It takes an argument which is a string so you can pass it anything, even
strings which include spaces, dashes - anything.
Jarek
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers