TwistingTwists
Pattern matching in other languages
I just noted that pattern matching of some sort was introduced in python 3.10
I guess there is destructuring in ES6 syntax in javascript.
I wonder
- How are pattern matching in these languages differ?
- Who started pattern matching first?
Which language? - What are other ideas you have seen being adopted outside Elixir which were Elixir originals?

Most Liked
dorgan
The original implementation of pattern matching in erlang is based on this book https://www.microsoft.com/en-us/research/uploads/prod/1987/01/slpj-book-1987.pdf
Sebb
when you bring up this great book, I have to say, that Peyton Jones and especially Wadler are fantastic speakers. This is one of my favourite talks and the best plea for functional programming I know: https://www.youtube.com/watch?v=IOiZatlZtGU
(You can safely skip the exhausting minutes 9-24 if you’re not “ready to learn about the hilarious subject of comptutablility theory”)
josefrichter
Rust also has quite nice pattern matching: Redirecting...
Came to use Rust only recently, trying to write some smart contracts for terra blockchain. In many ways it reminded me of Elixir actually, with similar terminology and some of the goodies we like in Elixir. Going to Rust from Elixir might actually be easier than from any other language. It felt very friendly really, I like Rust ![]()
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security










