Re:Microsoft takes .NET open source and cross-platform
by dragonwriter on Wednesday November 12, 2014 @07:05PM
(#8599152)
> C# allows default values for parameters, but it's not quite the same.
Right. Scala has C#-style default parameters as well, implicit parameters are a different (though very loosely related) thing.
C# allows default values for parameters, but it's not quite the same.
Example of C# default value for parameter:
In Scala, the default (implicit) value has more complex rules.Like C#, implicit parameters must come after non-implicit parameters (if any).
Unlike C#, the implicit value does not need to be defined in the signature. Also unlike C#, if you provide the value for one implicit parameter, you must provide the value for all implicit parameters.