PRE-PROPOSAL: Named method parameters with defaults.
vilya.harvey at gmail.com
Sun Mar 22 04:42:36 PDT 2009
2009/3/22 Neal Gafter <neal at gafter.com>
> On Sat, Mar 21, 2009 at 3:21 PM, Reinier Zwitserloot <
> reinier at zwitserloot.com> wrote:
> > Of all methods that have the same name (but different paramlists, e.g.
> > overloading), only one is allowed to be named in the first place.
> Honestly, I think this is a fatal restriction. I like named parameters,
> not if restricted to a single member of any overload set.
Subjectively, most of the time I write overloaded methods as a way of
providing default parameters for some cases. Actually being able to specify
the default parameters in the first place would mean that I simply wouldn't
need to have the overloads. Granted, there is the occasional case which
doesn't fit in that pattern, but for me it's a minor case so it wouldn't be
a show stopper - especially since you can fall back to the current position
of just not using named parameters there.
More information about the coin-dev