News for hackers. Stuff that matters.
Re:JavaScript Pattern Matching Proposal by macintux on Wednesday April 25, 2018 @12:24PM (#16923110)
> Having a pattern match in the code, even a weak, non-typed pattern match on literals or basic data types, can act as an assertion in your code

Exactly. That's one of the key points I make when talking about Erlang: the = sign specifically, and pattern matching more broadly, are like having full-time, production assertions everywhere.

One key to the success of that in Erlang/Elixir, of course, is that you have the infrastructure and language support to manage widespread assertions that can fail.

There are no comments on this comment yet.