I prefer { } style.
It can catch implicit narrowing bugs, which does not work with = style.Best regards, - Yusuke > On Sep 19, 2024, at 4:13 PM, Jean-Yves Avenard via webkit-dev > <[email protected]> wrote: > > > >> On 20 Sep 2024, at 7:55 AM, Ryosuke Niwa via webkit-dev >> <[email protected]> wrote: >> >> >> Should we do: >> >> struct Foo { >> int bar = 0; >> } >> >> Or >> >> struct Foo { >> int bar { 0 }; >> } >> >> We do both at the moment. >> >> - R. Niwa > > I think `int bar = 0` reads better. > > I only ever see (and use) { } and I thought that was the proper coding style. > > I’m surprised it’s not in our guidelines. > > Jean-Yves > _______________________________________________ > webkit-dev mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-dev
_______________________________________________ webkit-dev mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-dev

