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
Opt-out (by attribute?) auto-upcasting of method parameters #819
Opt-out (by attribute?) auto-upcasting of method parameters
I propose we add an attribute or another language construction to avoid automatic upcasting of parameters.
The existing way of approaching this problem in F# is doing some ugly hacks like wrapping the parameter in a generic type, usually a tuple including all the parameters that whose types we want to "fix".
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:
This is one of the main pain points we face when developing libraries like F#+ which uses member constraints and sometimes we have interfaces like
Consider the following example:
The way to workaround this is by wrapping:
Which is tupling the parameters into a single one, but this suggestion proposes something like:
The name of the attribute / language construct is to be discussed.