Jaroslaw Kowalski wrote:
Way too many colons for my liking. I understand why . isn't an option but :: for method reference looks pretty ugly.This is ofcourse the best solution for the issue Jeroen brought up, butthat
other users might still expect the possibility to use relationaloperations
on versions. Meaning: should the following functions return a versiondata
type :
assembly::get-version(string) file::get-file-version(string) file::get-product-version(string)
and we could then have the following functions in the version namespace :
version::get-major(version) version::get-minor(version) version::get-build(version) version::get-revision(version) version::to-string(version) version::parse(string) or version::from-string(string)
and support the same operators as supported by the System.Version.
Imagine this extension to NAnt function calls:
assembly::get-version('aaaa.dll')::major assembly::get-version('aaaa.dll')::minor assembly::get-version('aaaa.dll')::build assembly::get-version('aaaa.dll')::revision
('.' as a member access operator cannot be used because it can be a part of a valid identifier)
Same thing would work for functions that return datetime, timespan and other structures.
datetime::now()::seconds timespan::whatever()::totalseconds
In the future when we support typed properties, you'd be allowed to do it even on properties:
<property name="zzz" type="datetime" value="${datetime::now()}" /> <echo message="${zzz::seconds}" />
What do you think?
I'm not sure we need NAnts expression language to become a fully fledged object oriented language.
Ian
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers