Talk:String append: Difference between revisions

no edit summary
(not really in-place)
No edit summary
 
Line 6:
:::I've edited the task to clarify the difference in intent from concatenation. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 17:32, 4 October 2013 (UTC)
 
:If you look at the code on this page, almost none of the languages are actually operating "in-place". They are all variants of <code>s = "foo"; s += "bar"</code>, which in the underlying language implementation almost certainly allocates <code>"foo"</code>, then allocatesand <code>"bar"</code>, then allocates a third string and writes <code>"foobar"</code> to it (unless the whole thing is constant-folded at compile time). The fact that only a single named string variable <code>s</code> is used is merely a syntactical illusion. [[User:Stevengj|— Steven G. Johnson]] ([[User talk:Stevengj|talk]]) 18:41, 21 November 2013 (UTC)
Anonymous user