← Back to context

Comment by brudgers

8 years ago

Erlang uses a {H|T} pattern matching convention in lieu of language keywords. For what it is worth (limit x | x -> 0), I think Erlang is an exceptionally elegant piece of engineering as engineering. But it's not the 90% use case. Then again, neither is Lisp, ML, or Rust. The 90% use case these days is Javascript. Which I would hesitate to associate with the phrase "elegant piece of engineering" without an "in" prefix.

Python and Javascript may have pairs. They just live at the bottom of a Turing Tarpit.

I rarely used Python before the last few months, but I've already stumbled upon a great tragedy in the 3.x migration.

Although few know it, and fewer use it, Python 2.x allowed tuples to be unpacked in function heads, like Erlang. Since my last job was 100% Erlang, I stumbled into using it without knowing any better.

I decided a couple of months later that since it was a new project, I really should convert to Python 3, whereupon I discovered that feature had been removed due to parsing complexity and "because no one uses it."

Sigh.

  • This feature is still good to know about for use on legacy projects. Thanks for sharing!

    • With Python 2 due to be EOL'd in a couple of years, I'm not sure I should feel good about encouraging more use of it!