I strongly agree with Ryosuke, it is best to maintain a consistent style throughout the codebase.
Swift is a relatively new language still undergoing rapid development, it is hard to argue there is a canonical Swift style that will not change in the future. 20 years ago many ‘modern’ C++ coding guidelines were pushing styles that ultimately fell out of use for one reason or the other. Changing style as Swift continues to develop / introduce new guidelines will lead to style fragmentation across the codebase in addition to fragmentation from the rest of the codebase. It is better to follow WebKit’s existing coding style. Style is language agnostic: one can make C++ look like Haskell, JavaScript can be written both C-like and functional-like, etc. Remembering to use a certain style for Swift and another style for C++ seems to make less sense than consistently following a single style. > On Nov 4, 2026, at 1:41 PM, Eric Carlson via webkit-dev > <[email protected]> wrote: > > > >> On Nov 4, 2026, at 10:29 AM, Ryosuke Niwa via webkit-dev >> <[email protected]> wrote: >> >> >>> On Nov 4, 2026, at 6:04 PM, Abrar Protyasha <[email protected]> wrote: >>> >>> I want WebKit to adopt suggested/conventional Swift style, maybe with some >>> well-reasoned (and agreed on) project-specific tweaks. I don’t know if >>> there is added value in having source files of two different languages >>> follow one style? Swift is vaguely C-lang styled, but otherwise it’s a very >>> different programming language and we don’t necessarily need it to look the >>> same as C++. >> >> Consistency is important. Otherwise we’d have to constantly change the style >> between when we’re writing C++ vs. Swift. >> >>> There may be specific issues with the existing Swift style format enforced >>> in the project that we may want to debate, but for the most part it seems >>> best to just use as much of the defaults opined by swift-format. >> >> I strongly disagree. >> >> > > +1 > > -eric > > >> >> _______________________________________________ >> webkit-dev mailing list -- [email protected] >> To unsubscribe send an email to [email protected] > _______________________________________________ > webkit-dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] _______________________________________________ webkit-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]

