Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 2
    This is like saying you shouldn't keep pet fish because they'll die if their oxygen pump malfunctions. Disaster preparedness is fine, but you shouldn't subjugate your normal way of life to it. Commented Aug 19, 2024 at 13:57
  • 6
    If you do pull requests, your diff viewer (eg in Github or Azure DevOps) probably doesn't have type hinting. Commented Aug 19, 2024 at 15:53
  • 1
    Does your team write automated tests around the code? If so, then that's your readability and maintainability taken care of (and if not, then you have a problem which cannot be solved by coding style). Debates like this are among the worst kind of Bikeshedding and a complete waste of time. The IDE and the compiler (via Roslyn Analysers and VS auto-format) can enforce a style via .editorconfig. Any time wasted beyond that in some form of debate is better spent ensuring the tooling is taking care of it, and also writing tests. Commented Aug 19, 2024 at 18:24
  • 1
    @BenCottrell: is is possible to configure VS so it can distinguish between good and bad usage of var? Where do I get this, I will install it immediately. Commented Aug 19, 2024 at 19:07
  • 1
    We've been slowly removing the use of var in our code base. We use VS2022 and yeah, you get the hints, but that slows things down when reading a code base, especially if it's new to you (I've been working on this code for 3 years and there are still areas I've never looked at). Commented Aug 20, 2024 at 10:01