February 06, 2004 Re: Why no default arguments? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote: >> <method>(,,,<arg>,,,) > Now that's readable ;) If D were to support arbitrary default arguments I'd much prefer some sort of signifier: > > <method>( default, default, <arg>, default, default ) I once proposed exactly the same, with a --- token for a placeholder. Easy to read and to type. myFunction( ---, ---, 10, ---, ---); This stayed unheared. I think it doesn't make sense now, since this kind of addition can be made to 2.x D release, and the current semantics is out of question to be tampered with anyway. -eye |
Copyright © 1999-2021 by the D Language Foundation