Thanks for your opinion Scott. > Now for the larger question, Does everyone want expression support in NAnt? > > I think there are some real benefits to adding expression support. It will > make things much more flexible. But it also means that more complicated and > possibly harder to read build files can be built. I don't want to inundate > our users with features that could make maintenance harder.
I actually think that when we have EE in place, we could gain some simplicity and ease maintenance by removing or deprecating some tasks and/or properties. Take a look at: <available> <readregistry> <sysinfo> <tstamp> <xmlpeek> <script> <if> <ifnot> Each of these tasks is used to test or retrieve some values (from filesystem, registry, system configuration, system clock, XML file). They are all candidates for predicates available in expression evaluator. Example 1: ========= Instead of: <available type="File" resource="myfile.txt" property="myfile.present" /> <if propertytrue="myfile.present"> ... </if> you could simply write: <if test="${fileexists('myfile.txt')}"> </if> Example 2: ========= Instead of: <readregistry property="sdkRoot" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" hive="LocalMachine" /> you could write: <property name="sdkRoot" value="${registry.readValue('HKLM\Software\Microsoft\.NETFramework\sdkInstal lRoot')}" /> or even use it in an expression: <if test="${registry.keyPresent('HKLM','Software\Microsoft\Windows\CurrentVersio n\Uninstall\NAnt')}"> </if> Example 3: ========= Instead of: <tstamp property="build.date" pattern="yyyyMMdd" verbose="true" /> one could write: <property name="build.date" value=${dateToString(now(),'yyyyMMdd')}" /> Example 4 (taken from today's question to nant-users): ========= <property name="version.build.plus.one" value="${version.build + 1}" /> (this eliminates the need for <script> task in some cases) Example 5: ========= Instead of: <sysinfo /> <echo message="PATH is: ${sys.env.PATH}" /> <echo message="temporary folder is: ${sys.os.folder.temp}" /> you could write: <echo message="PATH is: ${getenv('PATH')}" /> <echo message="temporary folder is: ${gettemppath()}" /> This means that property space is less cluttered with system entries. 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