On Tue, Sep 28, 2010 at 4:26 PM, David Levin <le...@google.com> wrote:
> This came up before: > https://lists.webkit.org/pipermail/webkit-dev/2010-May/012873.html but I'd > like to understand it a bit better. > > It feels there were two points of view: > > 1. Use explicit only when necessary to prevent an undesirable implicit > conversion like int to vector. > 2. Use explicit except when it is desirable to allow an implicit > conversion that makes the code simpler. For example, the String <-> > AtomicString makes the bindings generator code simpler since it doesn't > need > to know which the underlying method takes. > > Are there any reasons beyond personal preference to select either of these? > > Starting list: > > Pro's for #1 > It is a pain to remember to put explicit every time you have a > constructor with one argument. > > Pro's for #2 > It would prevent accidental mistakes that happen with implicit > constructors. > > We're there some recent mishaps with implicit constructors that motivate this thread? -Darin
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev