3 ms·
It's superfluous.
by throw1234651234 6y ago
It's superfluous.
- masklinn 6y agoThat it's technically superfluous doesn't mean it's practically useless.
- velox_io 6y agoHow did the article not mention extension methods, when that's arguably the only true use case (many are against such methods). I'm a big C# fan, I like a lot about the language, but the inheritance is especially cumbersome and it can become a minefield for the uninitiated. It's only something you avoid when you have tripped by it. The biggest minefield is when using them in initializers, but I'm pretty sure the compilar has displayed warning for sometime and I believe Resharper has had it forever (.net 3.5?). The only legitimate uses of 'this' is when is when using indexers and when using 'this' as the first parameter in extension methods. Nothing else springs to mind, and as mentioned above, 'base' should normally be used in indexors. However, there are times when I have used it for readability (which could be considered as an antipattern). I guess this is an example of why languages become so complex. Semantic sugar everywhere (it's addictive!) Extention Methods https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...
- rcoveson 6y agosoiswhitespaceinmanylanguages
- draw_down 6y agoEverything besides what remains after you run a minifier is superfluous. (Which is more of a JS thing, but bear with me.) Lots of reasons we don’t write code that looks like that.