the short-circuit evaluation ( what you call laze evaluation ) is good too. That will be most natural for c# users.
Ian Jaroslaw Kowalski wrote:
Answering to myself:
I think it would be good to have functions named:
convert.toint() convert.tobool() convert.todate() convert.tostring() convert.todouble()
because such functions exist in .NET Class Library so users familiar with them would be comfortable.
Also, after some thoughts I vote for:
string.contains string.endswith string.indexof string.lastindexof string.length string.padleft string.padright string.startswith string.substring string.tolower string.toupper string.trim string.trimend string.trimstart
because it may not be obvious what "contains", "length", "trim" mean. They could apply to files on disk, some CVS repository or even a database values as well.
Note that there's already a function "file.length" for determining the length of the file.
Also - I think "if()" shouldn't be a function, but a language construct. Without it we cannot support lazy evaluation which is important for functions that have side effects or take a long time to execute.
That is:
if (somefunction(), formatMyHardDisk(), formatMyHardDisk())
would always format the disk regardless of someFunction() result. Lazy evaluation will also be used in constructs like:
(1=0 and (anything)) - anything will NEVER be evaluated because we know that it's value is irrelevant
What do you think?
Jarek
----- Original Message ----- From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 8:35 PM
Subject: [nant-dev] Function index now splitted by category
I've commited changes to EE-patches that emit function index in userdoc groupped by category.
I have one concern: should we keep some functions unprefixed:
int() bool() date() string() double()
+ all string functions, or should we employ some prefix for them?
Like "convert.int", "convert.bool", "convert.date", "convert.string"?
What about this very special function:
if (condition,value1,value2)
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
-------------------------------------------------------
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
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
------------------------------------------------------- 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
