Sometimes Boo is not conservative enough on certain defaults (which still makes sense for other/prototyping usages) that can lead to some errors slipping to a release unnoticed in (large) projects.
Strict mode introduces more conservative(safer) defaults and warnings.
Strict mode is disabled by default.
This compiler option is settable through:
- "-strict" with booc
- programatically by setting CompilerParameters.Strict to true
- "strict" argument with nant and msbuild tasks
When strict mode is enabled the following changes are enabled:
- default visibility is private like in C# (change made through
- methods parameters types and return type of public methods (API) must be explicitely declared [to avoid unnoticed/unwanted binary-compat breakage] (
- warns if a variable has the same name as a private field of one of its super types (
- implicit return statement fires a warning (
- implicit downcast fires a warning (
BOO-943) — default mode? or strict mode only?