Re: #pragma once?

2018-08-06 Thread Tim Armstrong
Seems like we have an informal consensus: I update the style guide to reflect this: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65868536 On Thu, Aug 2, 2018 at 3:22 AM, Zoltan Borok-Nagy < borokna...@cloudera.com.invalid> wrote: > +1 for #pragma once since it'

Re: #pragma once?

2018-08-02 Thread Zoltan Borok-Nagy
+1 for #pragma once since it's cleaner and less error-prone. Zoltan On Wed, Aug 1, 2018 at 11:03 PM Todd Lipcon wrote: > Yea, when we looked into it I recall that it worked fine on all compilers > from the last 10 years or something (in fact I remember using #pragma once > on M

Re: #pragma once?

2018-08-01 Thread Todd Lipcon
Yea, when we looked into it I recall that it worked fine on all compilers from the last 10 years or something (in fact I remember using #pragma once on Metrowerks Codewarrior more than fifteen years ago). Given we require C++14 I don't think #pragma once is going to be the limiting factor

Re: #pragma once?

2018-08-01 Thread Sailesh Mukil
An advantage of using #pragma once is potential improved compilation speeds. However, a con is that it's non-standard and therefore, its behavior can change at any point and can also vary across compilers, potentially making the code even less portable. That being said, since Kudu has been using

Re: #pragma once?

2018-08-01 Thread Jim Apple
Yes, definitely. On Wed, Aug 1, 2018 at 11:48 AM Tim Armstrong wrote: > Todd brought up our include guards on a code review, asking why we don't > use #pragma once instead: https://gerrit.cloudera.org/#/c/10988/5 . It > sounds like Kudu has switched to it > > #pragma once do