* [Cake] single letter names
@ 2018-06-29 14:29 Dave Taht
2018-07-01 20:33 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 4+ messages in thread
From: Dave Taht @ 2018-06-29 14:29 UTC (permalink / raw)
To: Cake List
at least a comment in the code would help.
https://lwn.net/Articles/758353/
--
Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Cake] single letter names
2018-06-29 14:29 [Cake] single letter names Dave Taht
@ 2018-07-01 20:33 ` Toke Høiland-Jørgensen
2018-07-01 22:00 ` Dave Taht
0 siblings, 1 reply; 4+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-07-01 20:33 UTC (permalink / raw)
To: Dave Taht, Cake List
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...
-Toke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Cake] single letter names
2018-07-01 20:33 ` Toke Høiland-Jørgensen
@ 2018-07-01 22:00 ` Dave Taht
2018-07-02 5:35 ` Pete Heist
0 siblings, 1 reply; 4+ messages in thread
From: Dave Taht @ 2018-07-01 22:00 UTC (permalink / raw)
To: Toke Høiland-Jørgensen; +Cc: Cake List
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...
>
> -Toke
--
Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Cake] single letter names
2018-07-01 22:00 ` Dave Taht
@ 2018-07-02 5:35 ` Pete Heist
0 siblings, 0 replies; 4+ messages in thread
From: Pete Heist @ 2018-07-02 5:35 UTC (permalink / raw)
To: Dave Taht; +Cc: Toke Høiland-Jørgensen, Cake List
> 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… :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-02 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29 14:29 [Cake] single letter names 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox