News for hackers. Stuff that matters.
Re:What’s New in C# 7.0 by mhomde on Wednesday August 24, 2016 @10:19PM (#12356598)
Yeah, I think lots of uses of out in the .Net framework are from the early days and a little bit of a mistake. Since they can't remove them this is suppose to make them easier to work with. TryGetValue comes to mind, but I agree overall out variables always felt clunky
Re:What’s New in C# 7.0 by douche on Thursday August 25, 2016 @01:56AM (#12357177)
Although F# manages to convert all those TryGetXXX methods into tuple-returning transparently, so it can be done. Just off the top of my head, you could probably write an extension method to wrap the original into the new format pretty easily.