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
I think this is a good addition, in my experience a lot of bugs can arise through using partial functions, and in most cases you shouldn't be using them when writing idiomatic F#.
My initial thought was that this could be achieved by adding hints, and it can to some degree, but with a dedicated rule we could also make use of typechecking information to check for instances of optionVar.Value and similar usages.
It would be quite cool if the hints allow you to specify the type of a variable, that would enable this to be done via hints and enable other rules like unnecessary casts etc to be done via hints
Activity
jgardella commentedon Jun 8, 2020
I think this is a good addition, in my experience a lot of bugs can arise through using partial functions, and in most cases you shouldn't be using them when writing idiomatic F#.
My initial thought was that this could be achieved by adding hints, and it can to some degree, but with a dedicated rule we could also make use of typechecking information to check for instances of
optionVar.Valueand similar usages.duckmatt commentedon Jun 10, 2020
It would be quite cool if the hints allow you to specify the type of a variable, that would enable this to be done via hints and enable other rules like unnecessary casts etc to be done via hints