4 ms·
"""And why is there this widely-held obsession that people who don't know your language should be able to tell what your code does (i.e., 'readability')? When w
by dextorious 15y ago
"""And why is there this widely-held obsession that people who don't know your language should be able to tell what your code does (i.e., 'readability')? When will this ever be relevant in the real world?"""
Em, you got it wrong. Readability is not about people "not knowing your language". It's about people knowing your language and having to read your code at a later point.
The problem with a language with poor readability is that it is hard to read even your own code written in it, because the syntax is ambiguous and funky and it involves a large mental overhead.
- bartl 15y agoWell I don't think that in b = list(a) it's clear in any way that the purpose of "list" is to make a copy.
- dextorious 15y agoNo, but it's clear that it returns a list out of "a".
- philh 15y agoMy guess upon seeing list(a) for the first time would have been that it returns [a], which is worse than not knowing what it does. Possibly this is because I've known lisp longer than python.
- lubutu 15y agoI agree. I write Python all the time, and I would have expected something like list(*a).
- sixtofour 15y agoHe's probably referring to this, from the article: "Isn’t it better, less cryptic, and more pythonic? a[:] feels a bit too much like Perl. Unlike with the slicing notation, those who don’t know Python will understand that b contains a list."