[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Prefer very easily distinguished names [Was: Prefer single-charact
From: |
Greg Chicares |
Subject: |
[lmi] Prefer very easily distinguished names [Was: Prefer single-character...] |
Date: |
Fri, 1 Jun 2018 22:54:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 2018-05-27 15:30, Vadim Zeitlin wrote:
[...]
> Sorry, I hadn't realized it but apparently we just have completely
> different mental models for reading. For me it's completely immaterial that
> "col" is contained in "col_width"
Differences in visual acuity are also important. Recently I read a post
by a well-known C++ expert who dislikes suffixing data members with an
underscore because he finds it hard to distinguish col from col_. He
was born in 1948; maybe I'll have that problem in six years. Today I
was surprised to see std::zeal() in the C++ standard: 'r' looks like
'ƶ' to me in that awful PDF font, even though std::imag() is nearby
and I know 'r' must be intended.
> GC> when I saw
> GC> for(auto const& line : lines)
> GC> my heart sank--I thought I had overlooked a glaring defect.
>
> I honestly absolutely no idea what this defect could be :-(
I see two shapes that look almost indistinguishable. The last two
characters in the plural name both look like 'ɵ' to me; doubling
that letter doesn't make it look very different from the singular.
> I've now found my new absolutely least favourite (and by far)
> lmi style rule :-(
Consider it repealed. It was misstated anyway (hence the amended
"Subject:"). Recently I was reading this in 'illustrator.cpp':
for(auto const& field : group_quote_invariant_fields)
{
if(case_default[field] != cell[field])
and I realized I wouldn't dream of changing that: what matters is not
whether the names are single characters, but whether they're starkly
different. There's no mistaking "group_quote_invariant_fields" for
"field". And "cell[field]" conveys the meaning better than "c[f]".
But if it had said
if(oall[field] != cell[field])
then I'd find the LHS and RHS indistinguishable.
- [lmi] Prefer very easily distinguished names [Was: Prefer single-character...],
Greg Chicares <=