3 ms·
I am incredibly psyched for Tuples, Pattern matching, Algebraic data types and Nullability Tracking (four of the most-likely list)! I mean, to be fair, these a
by halosghost 11y ago
I am incredibly psyched for Tuples, Pattern matching, Algebraic data types and Nullability Tracking (four of the most-likely list)!
I mean, to be fair, these are all things that Haskell offers me, but more languages getting these can't hurt! Good steps forward! Now, all I have to hope for is that the nix support for .NET becomes more robust so I can actually code in C# on platforms that I care about supporting ^_^ (Note: this is not meant as a slight towards Windows, I just prefer working with / coding for nix).
- platz 11y agoRegarding Pattern Matching and Algebraic data types, I am not sure that they are implementing both of these ideas to the fullest extent that you would find when we typically refer to these items in existing functional languages. For example, Pattern Matching. From my glance it appears a nice way to assign bindings from an expression, but I didn't see anything about guards. Also, any kind of pattern matching without the ability to check for exhaustiveness defeats the safety they provide usually comparable with inheritance. Which comes to Algebraic data types. All I know is there are several boxes you must tick to really call it "Algebraic data types". I am not sure all those boxes are "ticked" here. This question came up when swift introduced "Algebraic data types", but no-one could get recursive ADT's to compile. it does look like this proposal allows recursion, but there are other things i'm sure are at play such as how it works with generics.
- halosghost 11y agoAhh, that's too bad to hear. I read a little bit of each proposal, but was drawn back to work once a build completed and did not have a chance to exhaustively explore each one. Well, I hope that they manage to fill out each feature a little more. Fingers crossed!
- platz 11y agoreading a bit more, they did mention in the "optimizations" section "Closed hierarchies enable the compiler to detect when a set of matches are complete". I really hope they don't leave this to an optimization, and make it a core part of the feature!