Initializing default parameters from prior parameter

Robert M. Münch robert.muench at saphirion.com
Sat May 25 16:25:53 UTC 2019


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.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list