You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conciseness - not needing to spell out the type all the time
Convenience - only needing to specify the information needed for type inference
The disadvantages of making this adjustment to F# are enabling potential confusing signatures. However, existing inferred types prove that this is not the case.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S
Related suggestions: No
Affidavit (please submit!)
Please tick this by placing a cross in the box:
This is not a question (e.g. like one you might ask on stackoverflow) and I have searched stackoverflow for discussions of this issue
This is not something which has obviously "already been decided" in previous versions of F#. If you're questioning a fundamental design decision that has obviously already been taken (e.g. "Make F# untyped") then please don't submit it.
Please tick all that apply:
This is not a breaking change to the F# language design
I or my company would be willing to help implement and/or test this
The text was updated successfully, but these errors were encountered:
Types with inferred parameters are already overused.
Programmers will often use length as a measure of cleanness of code. This is an imperfect but natural measure. There will be a strong incentive to use this feature since it shortens code.
This will lead to inscrutable code that is more abstract than necessary and more complex to parse for both humans and the compiler.
openSystem.Collections.Genericletd1:IDictionary<int,bool>= dict []letd2= dict(List.empty<int*bool>)// Fewest characters, but the least comprehensible and least simple of the three.letd3:_<int,bool>= dict []
Actually the best thing here is to use let d4 = dict<int,bool> [] which is both shortest and simplest, but if you didn't spot that you would end up making the wrong choice of d3.
Inferred generic type definitions
I propose we allow inferred generic type definitions.
The existing way of approaching this problem in F# is typing out the generic type definition yourself.
Pros and Cons
The advantages of making this adjustment to F# are
The disadvantages of making this adjustment to F# are enabling potential confusing signatures. However, existing inferred types prove that this is not the case.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S
Related suggestions: No
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: