this -------------------------->
                my head
On Mon, Nov 12, 2018 at 4:46 PM Leif Hedstrom <zw...@apache.org> wrote:
>
>
>
> > On Nov 13, 2018, at 01:46, Walt Karas <wka...@oath.com.INVALID> wrote:
> >
> > When you talk about a space after the declarations that seems to imply
> > doing the C-like thing of putting all the declarations first.
>
> No. Just an empty line after the last declaration in that scope and before 
> other code.
>
> — Leif
> >> On Mon, Nov 12, 2018 at 10:43 AM Alan Carroll <solidwallofc...@oath.com> 
> >> wrote:
> >>
> >> I don't see the conflict.
> >>
> >>> On Mon, Nov 12, 2018 at 10:00 AM Walt Karas <wka...@oath.com.invalid> 
> >>> wrote:
> >>>
> >>> I'm more with the crowd that says you should keep the declaration as
> >>> close as possible to the first use.
> >>>> On Sun, Nov 11, 2018 at 4:44 PM Leif Hedstrom <zw...@apache.org> wrote:
> >>>>
> >>>> This might sound petty, but I really much prefer that we consistently 
> >>>> put empty lines after local variable declarations. We do so much of the 
> >>>> time, but definitely not consistently. Besides looking cleaner, doing 
> >>>> this consistently really helps making clang-format not indent code 
> >>>> stupidly.
> >>>>
> >>>> For example, without the empty line we get
> >>>>
> >>>>  if (auto it = g_records_ht.find(name); it != g_records_ht.end()) {
> >>>>    RecRecord *r = it->second;
> >>>>    *buf         = (char *)ats_malloc(sizeof(char) * 1024);
> >>>>
> >>>>
> >>>>
> >>>> Note how clang-format will align the =’s, even though they really aren’t 
> >>>> related.  Whereas with the empty line, it looks a lot nicer as
> >>>>
> >>>>  if (auto it = g_records_ht.find(name); it != g_records_ht.end()) {
> >>>>    RecRecord *r = it->second;
> >>>>
> >>>>    *buf = (char *)ats_malloc(sizeof(char) * 1024);
> >>>>
> >>>>
> >>>>
> >>>> My $0.01 of the day.
> >>>>
> >>>> — Leif
> >>>>
> >>
> >>
> >>
> >> --
> >> Beware the fisherman who's casting out his line in to a dried up riverbed.
> >> Oh don't try to tell him 'cause he won't believe. Throw some bread to the 
> >> ducks instead.
> >> It's easier that way. - Genesis : Duke : VI 25-28
>

Reply via email to