1

It seems pretty clear that most people prefer the usage of explicit access modifiers as a best practice, because:

In John Skeet's answer to a similar question, which on a whole echoes the above reasons, he says he was partly convinced by Eric Lippert "that making it clear that you've thought about it and decided to make something private is a good idea."

So is there a reason the item templates in Visual Studio 2017 differ from previous versions of VS in that they now use default access modifiers (this may have been the case for VS2015 as well, I don't know -- but it's not the case for 2013)?

class Program
{
    static void Main(string[] args)
    {
    }
}
rory.ap
  • 34,009
  • 10
  • 83
  • 174
  • I'm not a fan of "why" questions of this type on Stack Overflow, because the only people who can authoritatively answer this question work on the VS team at Microsoft. – Joel Coehoorn Jun 02 '17 at 16:09
  • Okay, I guess what I meant to say is: is there an explicit reason for this change from previous versions. – rory.ap Jun 02 '17 at 16:10
  • 2015 doesn't explicitly state the access modifiers either? – Reed Jun 02 '17 at 16:10
  • @JoelCoehoorn -- Well, there could be a documented reason. I realize they could make that decision and not tell the public, but maybe they didn't do that, i.e. maybe they DID tell the public. That's what I'm asking. It seems like an odd change to make (given the preference among users and professionals) without explaining. – rory.ap Jun 02 '17 at 16:13
  • 3
    By your first point modifiers in templates should be left implicit, because then, when you change that, it's clear that you "gave the matter some consideration". – Evk Jun 02 '17 at 16:14
  • It's a template. Few people care if templates are following the standard guidelines. The answer is likely just "nobody bothered to ensure the template met standards". – Erik Funkenbusch Jun 02 '17 at 18:02

0 Answers0