Talk:String append: Difference between revisions

no edit summary
(It's a duplicate I think.)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 4:
 
::I agree with Tim that there is a useful difference between appending to an existing value and creating a new value with expanded result, but these two tasks don't make that distinction and are in effect duplicates. This task should probably be tagged as the duplicate and later removed. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 16:22, 4 October 2013 (UTC)
:::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> and <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