param2 = param1

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Aug 27 13:05:06 PDT 2013


On Tue, Aug 27, 2013 at 12:56:12PM -0700, Walter Bright wrote:
> On 8/27/2013 12:47 PM, Jonathan M Davis wrote:
> >On Tuesday, August 27, 2013 21:33:06 =?UTF-8?B?Ikx1w61z?=.Marques
> ><luis at luismarques.eu>@puremagic.com wrote:
> >>On Tuesday, 27 August 2013 at 11:09:01 UTC, bearophile wrote:
> >>>Do you have some use cases for this?
> >>
> >>No, not at the moment. I was just wondering if there was a reason
> >>for what seemed an arbitrary difference between template
> >>parameters and normal parameters.
> 
> No reason. It simply never occurred to anyone. I've never heard of
> anyone wanting this in all my years of C, C++, and D.

TBH I've never heard of anyone wanting normal (non-template) parameters
to default to another parameter either. D is the first language I know
that has such a feature.


> >Not that I'm aware of. I'd file a bug (or at least an enhancement
> >request) on it on the grounds we should be consistent unless there's
> >a good reason not to be, and I'm not aware of any reason for this
> >particular inconsistency (though honestly, I wouldn't have expected
> >it to work in either case - if it can, great, but I would have just
> >assumed that it wouldn't).
> 
> I'd reject an enhancement request for this unless someone could
> demonstrate significant utility for it.

What was the original rationale for normal parameters to be able to
default to another parameter?


T

-- 
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? -- Michael Beibl


More information about the Digitalmars-d mailing list