Skip to content

Templates with <Nullable>enable</Nullable> are very irritating to get started with #37099

Closed
@Eilon

Description

@Eilon

Old AspNet template had a nullable, E I E I O. And on that template he had a reference, E I E I O. With a green squiggle here and a green squiggle there, here a squiggle, there a squiggle, everywhere a squiggle squiggle... you get the idea.

I absolutely love nullable support in C# 10, but in the default template I found it very irritating. When I'm just starting out, I'm not worried about a null value leaking through where it shouldn't, just like I don't add parameter or input validation to every method or API as I write the initial code. But the green squiggles that show up on every other line of code are very distracting. I like squiggle-free code, but not at the cost of having to annotate things before I'm even sure of what code I will end up with.

I'm afraid that having this on by default will be a huge problem for newcomers to .NET who are barely familiar with C#, let alone all the new C# 10 features. And also the multitude of users who are very familiar with C# but don't know the latest C# 10 features or what nullability means. This feature is very in-your-face and it's unlikely to be obvious to a C# 10 newcomer.

I would love a template where the existing code is fully annotated, but without <Nullable>enable</Nullable>. Once I'm in a good spot and I'm trying to clean up code, I will enable <Nullable>enable</Nullable> and go fix the squiggles.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions