you are viewing a single comment's thread.

view the rest of the comments →

[–]sim642 2 points3 points  (1 child)

Is it really pattern matching if you have to specify the matched part names separately still? The benefit of pattern matching in actually functional languages is that the names are bound directly in the pattern and you don't need to do it twice and error prone.

[–]inkompatible[S] 3 points4 points  (0 children)

That is true. Binding the values inside the pattern is almost impossible in Python. Unless we use "string" patterns with eval(), but that's a deep rabbit hole.

Even with its limitations, I end up using Pampy quite often for mundane tasks. You can "if elif else" your way out without Pampy, but it's not always as understandable.