Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]
Walter Bright
newshound2 at digitalmars.com
Tue Dec 14 13:30:08 PST 2010
Steven Schveighoffer wrote:
> Any idea how this can be 'solved' or do we need to continue doing things
> like this? My naive instinct is to use the declaration order to
> determine a match (first one to match wins), but that kind of goes
> against other overloads in D.
Yeah, I'd be extremely reluctant to change from a best match to a first match.
One reason is that first match cannot deal well with partial ordering, as it by
definition requires a total ordering.
Another reason is D's attempt to get away from C/C++'s declaration ordering
dependencies.
More information about the Digitalmars-d
mailing list