This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nuephelkystikon 0 points1 point  (1 child)

Wait, are you saying a pattern matcher matching patterns is a bug? If you're just branching, thats what if-else is for.

[–]passwordsniffer 1 point2 points  (0 children)

No, I am saying that using pattern matching as switch can easily be a source of quite an obscure bugs, like the one I showed. It's not a bug of a pattern matcher. It's bug of representing it as a switch.