1) I wrote the following line of code and got annoyed.
Why can't ASH have a varargs feature like modern Java?
int delay = min( min( min( min( semirare_delay, voter_delay ), ghost_delay ), mayfly_delay ), turns );
where the "min" function would be declared like this:
int delay = min( semirare_delay, voter_delay, ghost_delay, mayfly_delay, turns );
int min( int value... );
Either way, when we parse a function call and are looking for a matching function, if we find an "int" argument and discover a function whose final argument is an "int", we match the two and build an array with the rest of the ints.
int min( int value );
I wonder how hard that would be?
2) We have special handling for the main() function. If you give it arguments, you can call it with arguments in the CLI or not - in which case you are prompted for the arguments.
I'd like to be able to optionally specify a default to avoid the prompts.
Always requires a "command" and behaves as now. Perhaps:
void main( string command )
would let you specify a command in the CLI and set that variable, as now, or simply call the script with no arguments and it will receive the default value as specified in the script.
void main( string command = "my default command" )
I guess some clarification is needed for behavior if you have multiple arguments and not all of them specify a default value. We bind supplied arguments to parameters, as now, and when we run out arguments, do we prompt only for those which did not specify a default?