Replies: 5 comments 27 replies
-
How about warning on any types named |
Beta Was this translation helpful? Give feedback.
-
Has this actually been a problem to the point where it's compromised the design of a language feature? I feel like outside of (As an aside, does anyone have a link to the notes banning of types named
I feel like you didn't hear any complaints about this change because it was such a narrow change. I feel like trying to reserve all lower-case names as special in a 21-year-old language is quite a bit more aggressive than retroactively taking We would definitely be disabling this warning. We use On top of that it's going to cause friction with automated generation of interoperating with non-.NET things (whether with native code or a remote web service) where typical .NET naming conventions do not apply. |
Beta Was this translation helpful? Give feedback.
-
Yes. This adds significant cost to the team. This happens in the design process, where at have to attend an inordinate amount of time accounting for this. It then affects both the compiler and ide which must spend many cycles safely implementing things and ensuring that there will be no problems. It also adds a lot of cost and complexity to the actual code that needs to handle these cases. Ask these things slow us down a real amount and take real resources (both design and impl) away from other work. |
Beta Was this translation helpful? Give feedback.
-
Warning on all lowercase type names sure feels like throwing the baby out with the bath water. It seems like an extreme breaking change to make with minimal benefits. There is zero doubt this will severely break customers who have lowercase types and treat warnings as errors. I can't imagine how the benefit that you might in the future use another context-sensitive keyword is worth this huge break. If new features start at -100, I can see this maybe getting to -90. The argument that this isn't enforcing style also seems flimsy at best. Lower case type names are a thing in lots of other languages, eliminating them in C# means you are codifying a preferred style into the compiler; I don't see how that is even debatable. I also see some legitimate use cases for lowercase type names in C#. For example, modeling the API of an external system (likely written in some other language with different style rules). If this is done via code generation, or maybe even dynamically at runtime, you could easily end up with lowercase type names.
Hasn't the experience with Also, not to be rude, but your customers time is a lot more important than your time. You're not building the product for yourselves, after all. This is true for all of us that build commercial products. |
Beta Was this translation helpful? Give feedback.
-
Hello there, (following the comment from @PathogenDavid ) In Unity, we are using lower-case names for some special types that we consider as "primitives" (e.g float4) So we have 2 questions:
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/dotnet/csharplang/blob/main/meetings/2021/LDM-2021-10-13.md
Agenda
Beta Was this translation helpful? Give feedback.
All reactions