Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

?? Would you be more likely I make the jump if C# had more of F# features or less likely.

I wouldn't hold my breath for anything approaching parity.



Nope, but pattern matching will be in vNext.


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.


That sounds awesome.


The Yaron Minksy talk Effective ML (https://vimeo.com/14313378) has examples of using pattern matching and algebraic data types.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: