Editing
Talk:Append
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Append vs. prepend vs. concatenate == I'd like to see a little discussion distinguishing the concepts of '''append''', '''prepend''', and '''concatenate'''. Specifically, I venture that ''concatenation'' is more symmetric in that it emphasizes neither the first nor the second argument in binary operations. In contrast, ''append'' means to take a second something and put it after a first something. Furthermore, ''prepend'' means to take a second something and put it before a first something. :{{math|1=concatenate(''x'', ''y'') = ''x''.append(''y'') = ''y''.prepend(''x'')}} Assuming that this is something that textbooks distinguish, what should we say in this article? β[[User:Quantling|<span class="texhtml"><i>Q</i></span>uantling]] ([[User talk:Quantling|talk]] | [[Special:Contributions/Quantling|contribs]]) 22:01, 8 December 2023 (UTC) : Is the article meant to be about the general concept of appending, or about specific functions/predicates called "append" that exist in various programming languages? It seems to be mostly describing the latter, though it goes on to talk about features in a random few languages that aren't named "append" at all. Furthermore, in my mind "append" is at least primarily a verb, but the lead sentence describes it as a noun (albeit marked up as code). : To me, "append ''y'' to ''x''" means modify ''x'' to be the concatenation of ''x'' and ''y'' as was immediately before the operation. You can append to a file, meaning the same thing. On the other hand, "concatenate" implies simply joining the strings, arrays, lists or whatever together, and where you put or what you do with the result of the operation is on the back of this. : So by the names, I would probably expect :* {{math|concatenate(''x'', ''y'')}} to return ''x'' and ''y'' joined together and not modify either variable :* {{math|''x''.append(''y'')}} to modify ''x'', and possibly return the modified ''x'' as a convenience (this is what .NET <code>StringBuilder.Append</code> does, for instance, if this counts on the basis that <code>StringBuilder</code> is essentially a mutable string class) :* {{math|''y''.prepend(''x'')}} to modify ''y'', and possibly return the modified ''y'' as a convenience : β [[User:Smjg|Smjg]] ([[User talk:Smjg|talk]]) 11:44, 19 December 2025 (UTC) ::I agree with your bullets. I think we should say something like this in the article. β[[User:Quantling|<span class="texhtml"><i>Q</i></span>uantling]] ([[User talk:Quantling|talk]] | [[Special:Contributions/Quantling|contribs]]) 16:04, 19 December 2025 (UTC) ::: The article is a mess. It lacks a clear focus. From the history, I see that originally it was specifically about the Lisp {{code|append}} function. Subsequent edits have been a mishmash of: :::* Builtins in other languages called {{code|append}} that do the same thing. :::* Implementations of array/list concatenation in other languages. :::* Builtins to do the same in other languages that aren't called {{code|append}} at all. ::: Furthermore, the selection of languages covered is arbitrary. All the article is showing is how to do, in a small selection of languages, something for which there is a better-agreed-upon standard name: [[concatenation]]. I see that article purports to be about ''string'' concatenation specifically, but it isn't entirely - one section is about concatenation of audio snippets. In any case, there's no real reason to for it to be about concatenation of a single data type. That article should be generalised to cover concatenation of arrays and lists (of which strings are typically an example) generally, and relevant content from this article moved there. I'll propose a merge. β [[User:Smjg|Smjg]] ([[User talk:Smjg|talk]]) 21:04, 22 December 2025 (UTC) :{{u|Quantling}} & {{u|Smjg}}: any further thoughts on this? It's been listed as a pending merger proposal for a couple months. '''[[User:Thebiguglyalien|<span style="color:#0c4709">Thebiguglyalien</span>]]''' ([[User talk:Thebiguglyalien|<span style="color:#472c09">talk</span>]]) 04:37, 10 March 2026 (UTC) ::I see no reason to put effort into merging these pages, but if someone else wants to put in that effort, I see no reason to object. That is, I'm lazy but not stubborn. <abbr title="Smiling face" style="border-bottom: none;">[[File:Face-smile.svg{{!}}link=|18px]]</abbr> β[[User:Quantling|<span class="texhtml"><i>Q</i></span>uantling]] ([[User talk:Quantling|talk]] | [[Special:Contributions/Quantling|contribs]]) 00:48, 11 March 2026 (UTC)
Summary:
Please note that all contributions to Eurovision Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Eurovision Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit source
Add topic
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information