TwistingTwists

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

  1. How are pattern matching in these languages differ?
  2. Who started pattern matching first? :rofl: Which language?
  3. What are other ideas you have seen being adopted outside Elixir which were Elixir originals? :sweat_smile:

Most Liked

dorgan

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

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

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 :slight_smile:

Where Next?

Popular in Discussions Top

sergio
There’s a new TIOBE index report that came out that shows Elixir is still not in the top 50 used languages. It also goes on to call Elix...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14350 124
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New
crispinb
On reading dhh’s latest The One Person Framework it strikes me that Phoenix with LiveView is already pretty much this. However, never hav...
New

Other popular topics Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement