On Fri, Dec 3, 2010 at 1:28 PM, Eric Seidel <e...@webkit.org> wrote: > It seems to me, that using bool types for function arguments is strictly > worse than using an enum. An enum is always clearer and can be easily > casted to a bool if needed. > > doSomething(something, false); > > Is much less readable than: > > doSomething(something, AllowNetworkLoads); > > > Do any C++ gurus have further information to add here? Is my (simple) > analysis here incorrect? If not, seems we should forbid boolean values in > multi-argument methods/constructors in our style and add checks to > check-webkit-style to prevent further introduction of these confusing > callsites. > > -eric >
I was under the impression that this was already an encouraged style in WebKit code. At least, I really like that is makes call-sites more self-documenting. -Darin
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev