4 ms·
You are right. I was saying that coming from C, it seemed like pattern matching and a really cool feature. Until someone found how pattern matching works in Erl
by rdtsc 11y ago
You are right. I was saying that coming from C, it seemed like pattern matching and a really cool feature. Until someone found how pattern matching works in Erlang or Haskell.
Even in Python to its credit, iterable unpacking pretty nifty. It can now even do stuff like:
https://www.python.org/dev/peps/pep-3132/ https://www.python.org/dev/peps/pep-3132/
>>> a, *b, c = range(5)
>>> a
0
>>> c
4
>>> b
[1, 2, 3]