Skip to content

Commit ef67a8c

Browse files
committed
Add note on using compiler directives
1 parent 7b6356b commit ef67a8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rfcs/0002-feature-flags.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ VBA-Web has a strong, stable core that is supported across all platforms, but it
1212

1313
# Detailed design
1414

15-
Feature flags will be compiler constants that are `False` by default. The should start with "Enable" and then the feature name. Compatibility details should not be included in the feature name as this may change during development. Each flag should be isolated from all other feature flags. Behavior that depends on more than a single feature flag should be strongly discouraged and turning on one feature should not require turning on/off another.
15+
Feature flags will be compiler constants that are `False` by default. The should start with "Enable" and then the feature name. Compatibility details should not be included in the feature name as this may change during development. Each flag should be isolated from all other feature flags. Behavior that depends on more than a single feature flag should be strongly discouraged and turning on one feature should not require turning on/off another. Generally, public functionality related to the feature should be put _inside_ compiler directives so that using disabled features causes compilation errors (rather than runtime errors).
1616

1717
```vb
1818
' WebHelpers.bas
@@ -38,8 +38,8 @@ Feature flags will be compiler constants that are `False` by default. The should
3838
''
3939
#Const EnableFeatureB = False
4040

41-
' -> Use feature flags in compiler directives
42-
#If EnableA Then
41+
' -> Use feature flags with compiler directives
42+
#If EnableFeatureA Then
4343
Public Sub DoA()
4444

4545
End Sub

0 commit comments

Comments
 (0)