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 provided m */ }


You might make the first one final if you only want the one overridden.

Reply via email to