Re:Project Springfield: A Cloud Service Built in F#
by hkon on Wednesday December 14, 2016 @06:13PM
(#13180649)
Nope, but pattern matching will be in vNext.
[ Parent
| on HN ]
Re:Project Springfield: A Cloud Service Built in F#
by platz on Wednesday December 14, 2016 @06:24PM
(#13180736)
It's not the same thing.
C# "Pattern Matching" is little more than destructuring or switch on steroids.
However, much like how the compiler assists you when writing subclasseses so that you've implemented all the required methods, real Pattern Matching (F#) gives you the same guarantees from the compiler that you've handled all the possible cases appropriately. This makes real F# pattern matching much more useful than "switch with destructuring" and helps you grow your programs in a safe way. The C# way has all the same problems as the switch statement which gives no feedback about what cases you've handled.
Re:Project Springfield: A Cloud Service Built in F#
by hkon on Wednesday December 14, 2016 @06:30PM
(#13180773)
That sounds awesome.
Re:Project Springfield: A Cloud Service Built in F#
by tjalfi on Wednesday December 14, 2016 @11:18PM
(#13182363)
The Yaron Minksy talk Effective ML (https://vimeo.com/14313378) has examples of using pattern matching and algebraic data types.