4 ms·
I've never liked added explicitness for readability in tool heavy environments (which C#/VS is) since it tends to not add much value because those tools can im
by vsareto 6y ago
I've never liked added explicitness for readability in tool heavy environments (which C#/VS is) since it tends to not add much value because those tools can impart the same information. If we were doing C# in a really basic text editor, I could understand the need for qualifying 'this' though.
- DaiPlusPlus 6y agoVisual Studio (without third-party extensions) still doesn't offer a way to color/highlight/style static member call-sites differently to instance member call-sites, that's why I always prefix instance member access with `this.` and why I always give static fields a name with a leading underscore.
- accoil 6y agoDoesn't Visual Studio make static/const members bold these days? I can't find when it started happening, but there is at least someone wanting to turn it off Jan 2019: https://developercommunity.visualstudio.com/idea/437785/allow-to-turn-off-bold-keywords-with-enhanced-colo.html https://developercommunity.visualstudio.com/idea/437785/allo...
- DaiPlusPlus 6y agoAh, yes - that's a new setting in VS2019 (I use VS2017 as my daily driver, but sometimes use VS2019). It looks like VS2019 will only let you style static members in bold - or not - and that's it. You can't use a different color or italics - just bold or non-bold. Hmpf.
- nicoburns 6y agoI like explicitness for readability because I hate tool heavy environments! Most Java/C# IDEs are quite resources hungry, and noticeably slow down my Macbook.
- lazypenguin 6y agoThat's a fair argument. However I'd counter by saying that code is often read in "tool light" environments, such as a diff in an email, code in an online repository, etc.