-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
The 8.1 release notes re: "legacy_readonly" feature flag do not make explicit what the default value of the feature flag is in 8.1. Default values of newly introduced options should always be explicitly clear.
In addition, please consider the following ideas:
- Adopt a "off + default = false, on = true" model for all feature flags in the future. It is confusing that one needs to set "legacy_readonly" to false to enable new behavior. This would help reduce human coder-error such as in
MONGOID-5436. - Name feature flags based on the new behavior they introduce; avoid non-descriptive words like "legacy". For example, "enable_document_readonly_method" might be a better name.
- Prefix all feature flags with "feature_" (e.g. "feature_document_readonly_method"), which makes it more obvious that such flags will be removed in a future Mongoid version.