4 ms·
They both seem self evident, though I prefer the functional syntax. I don't write enough python that I don't have to look stuff up each time it comes up. C++ an
by galangalalgol 3y ago
They both seem self evident, though I prefer the functional syntax. I don't write enough python that I don't have to look stuff up each time it comes up. C++ and Rust are my normal tools, and they are both fine having a couple ways to do something. Is the "one way to do something" matra still a guiding principle for Python? Having multiple ways means when I guess at syntax I have more chances to be right.
There also seem to be really stong opinions about what is idiomatic. I find writing python without lots of typehints and a good IDE to be infuriating, but I've been told type hints aren't pythonic.
- deepsquirrelnet 3y agoTo me, the concept of “pythonic” has lost credibility for all the reasons you mention. It used to be that “duck typing” was a point of pride, something everybody learned. Now if you’re not type hinting, I think most people consider it bad practice. There’s a bajillion ways to do everything. We use print() now, but not raise(). f-strings or .format()? Maybe c-style string formatting? How about dict formatting? Is adding strings ever permissible? Didn’t we used to use single quotes? I thought that was pythonic too. Pythonic doesn’t exist. What’s popular is all there is. I say let’s bring map, filter and reduce into fashion.