Could pattern matching eventually be implemented in TypeScript ?

Topics: General
Oct 26, 2012 at 7:03 PM

 

Been using it in Scala, and love it.

 http://www.artima.com/scalazine/articles/pattern_matching.html

I find it (pattern matching) extremely useful, and would love to

have it in TypeSafe

Cheers

Coordinator
Oct 29, 2012 at 5:26 PM

Thanks for the suggestion.

Nov 2, 2012 at 8:22 PM

This library implements pattern matching:

https://github.com/natefaubion/matches.js

Perhaps you can figure out how to make it a bit more type safe.

Jan 24, 2013 at 6:10 PM

Pattern matching (like scala) and destructuring statements (as scala, coffeescript and livescript has) makes the code a joy to work with. Would be really nice to have in TypeScript.