Example of extensions for ValueTuple<A,B,C> (there are extensions up to ValueTuple<A,B,C,D,E,F,G> and Tuple<A,B,C,D,E,F,G>)
https://github.com/louthy/language-ext/blob/type-classes/Lan...
It allows cool stuff like this:
var abc = ('a', 'b').Add('c'); // ('a', 'b', 'c')
var abcd = ('a', 'b').Add('c').Add('d'); // ('a', 'b', 'c', 'd')
var abcd5 = ('a', 'b').Add('c').Add('d').Add(5); // ('a', 'b', 'c', 'd', 5)
var sumA = (1, 2, 3).Sum<TInt, int>(); // 6
var sumB = (2, 4, 8).Product<TInt, int>(); // 64
var flag = ("one", "two", "three").Contains<TString, string>("one"); // true
var str = ("Hello", " ", "World").Concat<TString, string>(); // "Hello World"
var list = (List(1, 2, 3), List(4, 5, 6)).Concat<TLst<int>, Lst<int>>(); // [1,2,3,4,5,6]Or do you simply mean some leaner syntactic sugar for their on-the-fly instantiation?
Point a = b with {X = 0}
this will make using immutable record types in C# much less tedious. Will also implement other stuff like value equality override, etc. I wish this was in 7.0, this is a great way to do FP in C# when you can't use F#.Proposal link : https://github.com/dotnet/roslyn/blob/features/records/docs/...
Structs differ from classes in that they are guaranteed to be contiguously placed laid out in memory; they're also non nullable and can't be a part of the inheritance hierarchy (though they can implement interfaces, which have some perf tradeoffs).
Haven't done such "real-world" stuff (with a proper server side, client side, data side etc) in Haskell either --- yet. It's not immediately productivity-inducing at all. I think over the very long haul, prolonged intensive exposure makes many a developer of "mainstream/web/crud/mvp/etc extractions" a much more rigorous, precise, exacting practitioner, which will yield a hard-to-quantify, harder-to-capitalize-on, but still very real and more substantive/deeper/sustained "productivity boost". It also teaches one to think of more robust patterns of abstraction and generalization which can translate back into programming-in-other-languages.
Nothing more tangible than that to report. Also there's a lot of curious-researcher-type "playfulness" in the wider ecosystem that's very tricky to assess what this will actually buy the "let's get coding" "brogrammer" (such as I)!
One facet that makes it quite worthwhile is that the language/compiler/ecosystem has incredibly bright people contributing not just by devising yet another funky undecipherable combinator for saving 10 lines of code in once-a-decade scenarios, but in fact actual hardcore pedal-to-the-metal under-the-hood optimizations, code check/test/validation assistence tools, keeping it all somewhat performant in server/parallel/concurrent scenarios and so on.