Gert:
>I'm definitely not saying that we should provide a task alternative for
>every function we support in the expression eval, but by not providing
task
>support for "basic" build "tasks", we're actually forcing build authors
to
>use expression support ...
I look at the separation between tasks and functions like the difference
between a procedure and a function in a procedural programming language:
nant tasks are procedures that do something but don't return a value,
while nant functions are functions that don't do anything except return a
value based on their input.
With this distinction, we can see that sysinfo still makes sense as a
task. It doesn't return a value (its more like a procedure that
initializes a bunch of class variables. The path task in contrast, does
nothing except "return" a single value into a property, and so makes more
sense as a set of functions.
You can see the difference in these hypothetical method definitions:
void mkdir(string path) { /*unconditionally create a directory at the
given location*/
void sysinfo() { /*unconditionally set a clearly defined set of class
properties*/ }
string path(string partial, bool fullpath, bool pathonly) /*do ugly
branching and return a string*/ }
bool available(string resource, TypeEnum type) /*do ugly branching and
return a string*/ }
So, rather than forcing people one way or the other, I think functions
make it easier for nant users to see when each is appropriate to use (and
for submitters to write): Use functions to get single values, use tasks
for everything else.
>If we decide to add William's task, I think we should :
>(suggestions snipped)
>What do you think ?
I lean toward not incorporating my submission. I think functions are a
better approach for its functionality, and we don't lose anything for it
(indeed as Ian pointed out, it will actually be cleaner as a set of
functions).
Also, depending on whether functional support is a) soon to be
incorporated, and b) modular and extensible, I would be willing to rewrite
the path task's functionality as functions (if they aren't already done).
Best,
Bill
William E. Caputo
ThoughtWorks, Inc.
http://www.williamcaputo.com
--------
idia ktesis, koine chresis
-------------------------------------------------------
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