News for hackers. Stuff that matters.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @08:59AM (#15567838)
Extension methods are useful for only one reason: they trigger code completion for browsing what this object can do. Static methods suffer from FP code completion problems (you can’t complete easily in the first arg of a function/procedure).
Re:Write tests. Not too many. Mostly integration by emodendroket on Friday October 27, 2017 @11:01AM (#15569015)
I think I am not mistaken in saying extension methods, like lambda functions, were invented primarily for the use case of Linq. Even if they weren't, that's how Linq is implemented, so extension methods serve more than that "one purpose" if you don't insist on writing C# in the style of C# 2.0.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @07:42PM (#15573142)
They came out at the same time, I’m sure there was some influence between them (Mads Tergesen would know better). However, all the functionality added in could have been done with static methods, just with more verbose syntax. LINQ query syntax could have been special cases. Anyways, I like what they came up with, it’s very versatile.
Re:Write tests. Not too many. Mostly integration by emodendroket on Friday October 27, 2017 @09:16PM (#15573473)
It's not clear that would have been much less work