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

Half of python was always syntactic sugar that could be also done one way or another with more primitive code. I mean for-loops, elif, import, the whole OOP; all just redundant syntactic sugar. Pythonic never meant to make the syntax less "sweet". Python is about making simple, straight forward code which removes unnecessary friction. And that's exactly what the walrus and switch are doing on their own.

But yes, of course can one also argue that they add friction on the global scale, because it's yet another syntax-element to know about, and the benefit is rather small on surface. But that's the problem with syntax, it's always a trade-off between overhead and benefit.



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

Search: