Open yaserbalaghi opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I see where you're coming from, though I'm not sure we would do that as it'd likely break a lot of people. @marcpopMSFT Are we the right place for this feedback? IDK if this should go to Roslyn or if it goes to C# lang
@nagilson this feels more like a @baronfel question and a template question.
IIRC @DamianEdwards and @KathleenDollard had some input into what set of Global Usings were originally decided on. What heuristics were you all going off of? I'm inclined to thing that Console
is a step too far, but some kind of data-backed frequency analysis here might be useful.
the initial confusion will be less and actually it will also be better for professionals
I'm not sure I agree with this assertion on its face. Console is a highly domain-specific area of code, and in most apps I'd say that it is silo'd off into a specific area of the app (notably the CLI arg parsing section) and the rest of your app doesn't ever care about it. To me that's an argument for a file-local using static
, not a project-global `using static.
Agreed. Adding global static usings is definitely a step beyond what we've thought to date is appropriate for our defaults.
Hi everyone, I suggest that when creating a console project, the following global direction should also be added to the GlobalUsings.cs auto-generation file.
global using static global::System.Console;
So, along with the "Top-Level Statements" feature to teach C# to beginners, the initial confusion will be less and actually it will also be better for professionals.
Thank you for your attention.