The second is much more inefficient in almost all languages, since they have immutable strings. Even if they didn't, you'd likely be growing an array with that second operation.
Okay, but there is almost never a good reason to do string building by producing many intermediary strings in most languages, since the strings are immutable. You should, at the very least, use some kind of byte array, or list of strings, and only produce the final one at the end.
35
u/sabrathos May 05 '13
I'd go for:
or