On Saturday, 25 May 2019 at 16:25:53 UTC, Robert M. Münch wrote:
myfunc(myObj o, myType m = o.getmyTypeValue()){...}
I'd probably just write it
myType m = null) {
if(m is null) m = o.getmyTypeValue;
}
or
myfunc(myObj o) { /* use the default */ }
myfunc(myObj o, myType m) { /* use the provi
Wouldn't it make sense if this would be possible? It would shorten the
function interface in cases, where no specialization of m is needed but
still makes it possible to override.
myfunc(myObj o, myType m = o.getmyTypeValue()){...}
The compiler complains, that o is an undefined identifier.
--