[webkit-dev] String::operator+= considered harmful

Maciej Stachowiak mjs at apple.com
Tue Sep 4 17:30:05 PDT 2012


On Sep 4, 2012, at 5:16 PM, Mike Lawther <mikelawther at chromium.org> wrote:

> On 5 September 2012 09:44, Dirk Schulze <dschulze at adobe.com> wrote:
>  It is very likely that even future code will land with this operator instead of StringBuilder.
> 
> Not if Adam removes the operator as he proposed earlier :)
> 
> If operator+= cannot be made sufficiently efficient, we could always leave the operator there, but have it ASSERT with a message saying to use StringBuilder.

Please not this. Failing at compile time is much better than failing at runtime in debug builds only.

Cheers,
Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120904/ba8ac87b/attachment.html>


More information about the webkit-dev mailing list