3 ms·
You do realize that Rust, C#/F#, Kotlin/Scala, now Java to an extent, pretty much all FP and many other languages have extensive pattern matching support?
by neonsunset 2y ago
You do realize that Rust, C#/F#, Kotlin/Scala, now Java to an extent, pretty much all FP and many other languages have extensive pattern matching support?
- adregan 2y agoIn fairness, it's doing a bit more than "just" pattern matching. It's very similar to the `with` expression in elixir: https://hexdocs.pm/elixir/1.16.3/Kernel.SpecialForms.html#with/1 https://hexdocs.pm/elixir/1.16.3/Kernel.SpecialForms.html#wi... You can use it to execute a series of functions returning `either`-ish tuples and build up a railway oriented program.
- metadat 2y agoIt goes beyond your typical pattern matching, check out the link in my first post if you're curious to learn!