Implicit usings

With the latest C# versions, there is an option of using implicit usings. This means that one does not have to explicitly import any of the more commonly used namespaces. This has the potential to reduce friction for the students, but comes at the cost of the students not knowing when they need to add an import. Should we be supporting this new feature? It’s enabled by default for .NET 9 projects.

Is this from stdlib only? So doesn’t mean external libraries etc?


I think so, yes. I don’t think having to remember what is imported from where adds hugely value. And if you’ll be able to not think about it in the future, that seems fine to be. Coming from a world like Rails where I basically never manually require things, this feels very sane/natural to me.

1 Like

Correct, but you can add additional usings (which the unit testing library now uses).

Yeah that was also how I felt.

Great, I’ll go work on an update,. Several bigger updates coming :)

3 Likes

Because you’ll find this in the wild going forward, my opinion on this matches yours (both).

2 Likes