On Thu, Feb 7, 2019 at 12:53 PM Tim Horton <timothy_hor...@apple.com> wrote:

>
>
> > On Feb 7, 2019, at 12:47 PM, Daniel Bates <dba...@webkit.org> wrote:
> >
> > Hi all,
> >
> > Something bothers me about code like:
> >
> > void f();
> > void g()
> > {
> >     if (...)
> >         return f();
> >     return f();
> > }
>
> ⸘do people do this‽
>

I much prefer doing this in my own code but stay away from it in WebKit
because we tend to have a separate return.

> I prefer:
> >
> > void g()
> > {
> >     if (...) {
> >         f();
> >         return
> >     }
> >     f();
> > }
> >
> > Does it bother you? For the former? For the latter? Update our style
> guide?
>
> +1 to a style guide update
>

Yeah, we might as well as codify it in the style guideline for clarity.

- R. Niwa
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to