Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I've been working with Python for too long but I don't see the value in Python's pattern matching. if/elif/else are all four letters just like case and I remember reading that Guido didn't want a match and case construct.

Maybe I am just grumpy but I feel like Python the simple language that drew in a lot of developer is going the C++ way of adding features for the sake of adding features.



Have a look at the the tutorial pep and you'll realize like I did, that pattern matching and case switches solve very different use cases, and that if-else are a long shot from pattern matching.

https://www.python.org/dev/peps/pep-0636/

> and I remember reading that Guido didn't want a match and case construct.

look at who the sponsor of that pep is.


I can absolutely see that it could be useful, what I am saying is that I would prefer the language to stay lean and steer away from adding features offering minimal quality of life improvements.

As for Guido being the sponsor, he also pushed for it in 2006 and it was rejected for lack of popular support. His opinion back then still resonates with me today: https://www.python.org/dev/peps/pep-3103/#rationale




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: