Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use an Attribute to specify overload resolution priority #821
Use an Attribute to specify overload resolution priority
I propose we add a way to use an Attribute to specify overload resolution priority
The existing way of approaching this problem in F# is adding a "marker" dummy parameter with a concrete class which inherit from other objects which will be used to mark less priority, since the overload resolution prefers the type which is closer in hierarchy.
This will be very valuable when using member constraints, projects like F#+ or the Task Builder, including the upcoming version baked into the compiler, make use of this workaround due to lack of a formal mechanism.
Pros and Cons
The advantages of making this adjustment to F# are:
The disadvantages of making this adjustment to F# are:
Estimated cost: S:
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply: