[webkit-dev] String::operator+= considered harmful
Mike Lawther
mikelawther at chromium.org
Tue Sep 4 17:36:04 PDT 2012
>
>
> 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.
>
> I was only half serious, figuring that leaving out operator+= would
probably tempt a future contributor to "fix" it :) Using #error would of
course be much better if this path were to be followed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120905/1947b326/attachment.html>
More information about the webkit-dev
mailing list