Re: function default parameters

2017-04-21 Thread dusenberrymw
Yeah we should adopt the syntax that R and Python both use, in which default arguments are defined in the function definition. Primitive types such as ints and strings can be set in the function definition, and more complex types such as matrices can simply use a null value as the default in

Re: function default parameters

2017-04-21 Thread Deron Eriksson
BTW, that is assuming our algorithms have been converted to functions. Deron On Fri, Apr 21, 2017 at 5:37 PM, Deron Eriksson wrote: > Thank you Matthias. I highly agree with your idea about having a default > specification similar to R WRT the function signatures for

Re: function default parameters

2017-04-21 Thread Deron Eriksson
Thank you Matthias. I highly agree with your idea about having a default specification similar to R WRT the function signatures for default values. This becomes a significant issue for some of our algorithms, where they might take in 10 arguments but default values are should typically be used

Re: function default parameters

2017-04-21 Thread Matthias Boehm
well, for arguments passed into dml scripts there is of course ifdef($b, 2) but for functions there is indeed no good support. At runtime level we still support default parameters for scalar arguments at the tail of the parameter list but I guess at one point the corresponding parser support was

function default parameters

2017-04-21 Thread Deron Eriksson
Is there a way to set default parameter values using DML? I believe both R and Python offer this capability. The only solution I could come up with using DML is to pass in a variable that is NaN and cast this to a string and use this string in an if conditional statement. addone =