on the language tab in the project properties, there is a switch for named arguments. This switch is off for all dialect except core. See documentation for the reason why this is switched off and the consequences it has to switch it on.
There's some discussion going on, if named and optional parameters are good or bad. From my own experience I know that sometimes they are neccessary if you call some methods implemented in a 3rd party library. But, in my own code I try to prevent them, because there are some potential risks especially in refactoring.I personally prefer to operate with option classes.
fxm post=24789 userid=398 wrote:
Thanks for that - have stared at that screen so many time but I guess I wasn't looking looking for named parameters then.
Turned it on for the project I was working on and it worked great - it just happened to break a whole bunch of other stuff.
The problem with the current implementation is that code like
Can both be a named parameter, but it can also be an assignment to Param1 and then send that value to the Foo() function.
We could prevent that when we choose an alternative operator.
I was thinking of
- =
- ::
- :==
- ::=
What do you think ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu