----- Original Message ----- From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>
Cc: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, August 14, 2004 3:08 PM
Subject: Member access operator (WAS: Re: [Nant-users] checking nant version)
This is ofcourse the best solution for the issue Jeroen brought up, butthatother users might still expect the possibility to use relationaloperationson versions. Meaning: should the following functions return a versiondatatype :
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 guess I don't really like ... It would ofcourse reduce the verbosity of the expressions, but it doesn't improve readability.
I just don't see a strong need for it I ...
But its just my personal opinion ...
Gert
------------------------------------------------------- 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-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users