|
|
|
|
|
by jnxx
1958 days ago
|
|
I very much want to agree with you. Only that I do not know any more what "Pythonic" is supposed to mean. One thing that Larry Hastings refers to seems often to be underestimated - readability. It seems nice to be able to do code golfing and use pattern matching to reduce an expression from maybe 50 lines to 10. But what matters far more is that one can read code easily, without guessing, and without consulting definitions of edge cases. Even in smaller projects, one will read 10 times more code than one writes. In larger projects and as a senior programmer, that could be a factor 100 or 1000. Not that unusual to work one week through a bug in someone else's code, and fix it by changing a single line. As code becomes more complex, it becomes really important to understand exactly what it means, without guessing. This is key for writing robust, reliable and correct code (and this is perhaps why the ML and functional languages, which stress correctness, tend to be quite compact). And while it might be satisfying puzzle-solving for smart and easily bored people, like you and me, to write that pattern matching code and reduce its length, it is just not feasible to read through all the PEPs describing surprising syntactic edge cases in a larger code base. |
|