From: Pete Heist <pete@heistp.net>
To: Dave Taht <dave.taht@gmail.com>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Cake List" <cake@lists.bufferbloat.net>
Subject: Re: [Cake] single letter names
Date: Mon, 2 Jul 2018 07:35:30 +0200 [thread overview]
Message-ID: <C73752F3-0428-4703-8E8A-31ED928405C4@heistp.net> (raw)
In-Reply-To: <CAA93jw5LTKCS-1uoXLDf29APH8qQ1OofzqZ=AYwieOA+cfwgbw@mail.gmail.com>
> On Jul 2, 2018, at 12:00 AM, Dave Taht <dave.taht@gmail.com> wrote:
>
> I assume l and r are left and right, but m, mb, a and so on are rather
> arbitrary.
>
> I don't care about this enough to change it.
> On Sun, Jul 1, 2018 at 4:33 PM Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>>
>> Dave Taht <dave.taht@gmail.com> writes:
>>
>>> at least a comment in the code would help.
>>>
>>> https://lwn.net/Articles/758353/
>>
>> I do believe you have commit access…
One of the Go founders (Andrew Gerrand) gave the rule of thumb that the greater the distance between a name’s declaration and its uses, the longer the name should be (https://talks.golang.org/2014/names.slide). There can be exceptions, but I rather like and prefer well chosen single letter names for locals in many cases due to less typing and that the structure can be understood more quickly. Comments as appropriate that help readers figure out why the particular letter was chosen are nice, of course, when it’s not obvious, but that’s just my $0.02… :)
prev parent reply other threads:[~2018-07-02 5:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 14:29 Dave Taht
2018-07-01 20:33 ` Toke Høiland-Jørgensen
2018-07-01 22:00 ` Dave Taht
2018-07-02 5:35 ` Pete Heist [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C73752F3-0428-4703-8E8A-31ED928405C4@heistp.net \
--to=pete@heistp.net \
--cc=cake@lists.bufferbloat.net \
--cc=dave.taht@gmail.com \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox