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 propose we deprecate certain existing corner-case features of F#
Make the use of the ".ml" and ".mli" file extensions give errors on command line and IDE by default and no longer give direction to the "/mlcompatibility" flag but rather go via an https://aka.ms link explaining this feature is being removed (they currently give textual warnings directing to use "/mlcompatibility")
Make the “/mlcompatibility” flag hidden and give a deprecation warning on use (it is currently accepted without a warning) with the same https://aka.ms link
This also covers the (* IF-OCAML .. *) and other things that require "/mlcompatibility".
When "#indent “off” and #light “off” are used (in command line compiler or the IDE) they should give the same error and link - again requiring "/mlcompatibility" to explicitly enable. This will not be available at all in scripts except by starting fsi with "/mlcompatibility", there will no option to enable this without an error in script editing.
(This maybe more controversial as I believe there have historically been people using F# who prefer the indentation-off syntax. However in reality new features since F# 4.0 have only been tested with the indentation-aware default syntax. It's time to embrace this as the reality for the language)
The same thing applies for the infix keywords "land", "lor", "lxor", "lsr", "lsl", "mod”, "asr". These were in F# 1.0 in the language for OCaml compat and are never encouraged to be used. They should not have made it into F# 2.0+ as a "warning" and should always have been an "error".
I feel there are a few more too though I didn’t find them on a quick scan of the codebase. There are some “error” deprecations we can trim out for code cleanliness, e.g.
I propose we deprecate certain existing corner-case features of F#
Make the use of the ".ml" and ".mli" file extensions give errors on command line and IDE by default and no longer give direction to the "/mlcompatibility" flag but rather go via an https://aka.ms link explaining this feature is being removed (they currently give textual warnings directing to use "/mlcompatibility")
Make the “/mlcompatibility” flag hidden and give a deprecation warning on use (it is currently accepted without a warning) with the same https://aka.ms link
This also covers the
(* IF-OCAML .. *)
and other things that require "/mlcompatibility".When "#indent “off” and #light “off” are used (in command line compiler or the IDE) they should give the same error and link - again requiring "/mlcompatibility" to explicitly enable. This will not be available at all in scripts except by starting fsi with "/mlcompatibility", there will no option to enable this without an error in script editing.
(This maybe more controversial as I believe there have historically been people using F# who prefer the indentation-off syntax. However in reality new features since F# 4.0 have only been tested with the indentation-aware default syntax. It's time to embrace this as the reality for the language)
The same thing applies for the infix keywords "land", "lor", "lxor", "lsr", "lsl", "mod”, "asr". These were in F# 1.0 in the language for OCaml compat and are never encouraged to be used. They should not have made it into F# 2.0+ as a "warning" and should always have been an "error".
Give a deprecation warning for
!
and instead request the use of.Value
, covered in this issue Give advisory messages when using ! and :=, and ask users to use .Value instead #569. This may be more controversial and will affect a substantial amount of F# code. See the separate issue which has already been approved in principle.I feel there are a few more too though I didn’t find them on a quick scan of the codebase. There are some “error” deprecations we can trim out for code cleanliness, e.g.
The text was updated successfully, but these errors were encountered: