dotnet / dotnet/fsharp

Remove always-on language-feature flags (stable since ≤ F# 8.0)

Open
#20,139 0 comments 0 reactions 1 assignee Claimed by @T-Gro View on GitHub
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

The minimum `--langversion` the compiler accepts is **8.0** (anything lower is a hard error). Every `LanguageFeature` mapped to **≤ 8.0** is therefore permanently enabled and its on/off flag is dead configuration. This tracks removing those flags and collapsing the guarded code to its enabled behaviour, one feature per child issue.

Scope: **59 features**. Features mapped to ≥ 9.0 are real toggles and are out of scope.

| Tier | Count |
|---|---|
| F# 4.7 | 4 |
| F# 5.0 | 11 |
| F# 6.0 | 13 |
| F# 7.0 | 8 |
| F# 8.0 | 23 |
| **Total** | **59** |

Each child PR removes a single feature flag; `--disableLanguageFeature:` for a removed feature becomes an unrecognised-feature error.

**Children**

_F# 4.7_
- [x] #20143 `ImplicitYield`
- [x] #20140 `RelaxWhitespace`
- [x] #20141 `SingleUnderscorePattern`
- [x] #20142 `WildCardInForLoop`

_F# 5.0_
- [x] #20144 `AndBang`
- [ ] #20152 `DefaultInterfaceMemberConsumption`
- [x] #20145 `DotlessFloat32Literal`
- [x] #20146 `FixedIndexSlice3d4d`
- [x] #20147 `InterfacesWithMultipleGenericInstantiation`
- [x] #20153 `NameOf`
- [x] #20154 `NullableOptionalInterop`
- [x] #20148 `OpenTypeDeclaration`
- [ ] #20149 `PackageManagement`
- [ ] #20150 `StringInterpolation`
- [ ] #20151 `WitnessPassing`

_F# 6.0_
- [ ] #20165 `AdditionalTypeDirectedConversions`
- [ ] #20155 `AttributesToRightOfModuleKeyword`
- [x] #20156 `DelegateTypeNameResolutionFix`
- [ ] #20157 `ExpandedMeasurables`
- [x] #20163 `IndexerNotationWithoutDot`
- [x] #20158 `NonVariablePatternsToRightOfAsPatterns`
- [x] #20164 `OverloadsForCustomOperations`
- [x] #20138 `PrintfBinaryFormat`
- [ ] #20159 `RefCellNotationInformationals`
- [x] #20160 `RelaxWhitespace2`
- [ ] #20166 `ResumableStateMachines`
- [x] #20161 `StructActivePattern`
- [x] #20162 `UseBindingValueDiscard`

_F# 7.0_
- [x] #20167 `BetterExceptionPrinting`
- [ ] #20168 `ErrorOnDeprecatedRequireQualifiedAccess`
- [x] #20169 `InitPropertiesSupport`
- [x] #20174 `InterfacesWithAbstractStaticMembers`
- [x] #20170 `LowercaseDUWhenRequireQualifiedAccess`
- [ ] #20171 `ReallyLongLists`
- [ ] #20172 `RequiredPropertiesSupport`
- [ ] #20173 `SelfTypeConstraints`

_F# 8.0_
- [x] #20175 `AccessorFunctionShorthand`
- [x] #20176 `ArithmeticInLiterals`
- [ ] #20197 `CSharpExtensionAttributeNotRequired`
- [ ] #20177 `ConstraintIntersectionOnFlexibleTypes`
- [x] #20178 `DiagnosticForObjInference`
- [ ] #20179 `ErrorForNonVirtualMembersOverrides`
- [ ] #20180 `ErrorReportingOnStaticClasses`
- [x] #20181 `EscapeDotnetFormattableStrings`
- [x] #20194 `ExtendedFixedBindings`
- [x] #20182 `ExtendedStringInterpolation`
- [x] #20195 `ImprovedImpliedArgumentNames`
- [ ] #20183 `MatchNotAllowedForUnionCaseWithNoData`
- [x] #20184 `NestedCopyAndUpdate`
- [ ] #20185 `NonInlineLiteralsAsPrintfFormat`
- [x] #20186 `PreferStringGetPinnableReference`
- [ ] #20187 `StaticLetInRecordsDusEmptyTypes`
- [x] #20188 `StaticMembersInInterfaces`
- [x] #20189 `TryWithInSeqExpression`
- [ ] #20190 `WarningWhenCopyAndUpdateRecordChangesAllFields`
- [x] #20191 `WarningWhenInliningMethodImplNoInlineMarkedFunction`
- [ ] #20192 `WarningWhenMultipleRecdTypeChoice`
- [ ] #20196 `WarningWhenTailRecAttributeButNonTailRecUsage`
- [x] #20193 `WhileBang`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.