[Python-ideas] PEP 505: None-aware operators
Mikhail V
mikhailwas at gmail.com
Thu Jul 26 10:56:29 EDT 2018
On Thu, Jul 26, 2018 at 5:10 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Wed, Jul 25, 2018 at 05:11:08PM -0500, Abe Dillon wrote:
>> The problem here is not whether it's explicit. It's about Readability and
>> conciseness. Using symbols in place of words almost always harms
>> readability in favor of conciseness.
>
[...]
> Do you know what helps readability? *Learning to read*. Once you have
> learned to read ?. and friends, they will be as readable as . and
> slicing is now.
No it is not like that.
E.g. slicing is intuitive and straightforward concept even for a non-programmer.
And no, it is not (only) about learning.
For example, no matter how experienced a programmer is,
complex comprehensions will be less readable than the
same construct written in loops and ifs.
Or say this:
user?.profile?.food
will be less readable than say:
user » profile » food
No matter how long you learn it, the former remains ugly and
obfuscating.
With that said, I don't say this syntax deserves something better,
I just say that I can't see how your "learn more" argument applies
here.
Mikhail
More information about the Python-ideas
mailing list