During LDM discussion on records, there was interest to have an analyzer warn on lower-cased type names. The motivation is that knowing that we discourage lower-cased type names would allow us to introduce new keywords (like record) with less concern about the breaking change.
I'm not sure whether this should be done by the compiler, a roslyn analyzer or some BCL analyzer.
Design:
- We use
char.IsLower(...) for lower-case check.
@ prefix avoids warning.
- All named types, included delegate types, are checked.
- Type and namespace aliases are checked too.
FYI @mikadumont @jmarolf
During LDM discussion on records, there was interest to have an analyzer warn on lower-cased type names. The motivation is that knowing that we discourage lower-cased type names would allow us to introduce new keywords (like
record) with less concern about the breaking change.I'm not sure whether this should be done by the compiler, a roslyn analyzer or some BCL analyzer.
Design:
char.IsLower(...)for lower-case check.@prefix avoids warning.FYI @mikadumont @jmarolf