a software and game development blog

Why implicit usings are THE DEVIL

Reading time: a minute
Why implicit usings are THE DEVIL

I really dislike the choice to change project defaults in .NET 6 console projects to use implicit usings.

They introduce code ambiguity and it disguises part of the standard coding paradigm in C#, it also suggests and implies certain features which do not exist and might confuse a beginner.

For example, in many popular scripting languages (Ruby, JavaScript etc) writing at this level is a global scope, you can define variables and functions in a global scope but in C# the compiler is actually generating the using statements, namespace, class and function wrapper at compile time.

Therefore someone learning the language having experience in scripting languages may get the wrong end of the stick.

This to me violates code consistency and frankly I'm fed up of having no "non-implicit" template options. It being a forced project default when most cases I can imagine people would NOT want to use this feature; is beyond me.


Welcome to my blog! I'm a computer programmer, I develop software, games, make music. I write about various aspects relating to the development process, be it art, coding or even design.

Recent articles