Talk:Append
Template:WikiProject banner shell
External links modified
[edit source]Hello fellow Wikipedians,
I have just modified one external link on Append. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive https://web.archive.org/web/20070413005952/http://www.math.chalmers.se:80/~rjmh/Papers/whyfp.pdf to http://www.math.chalmers.se/~rjmh/Papers/whyfp.pdf
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).
Cheers.—InternetArchiveBot (Report bug) 14:34, 16 October 2016 (UTC)
Append vs. prepend vs. concatenate
[edit source]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.
- concatenate(x, y) = x.append(y) = y.prepend(x)
Assuming that this is something that textbooks distinguish, what should we say in this article? —Quantling (talk | 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
- concatenate(x, y) to return x and y joined together and not modify either variable
- x.append(y) to modify x, and possibly return the modified x as a convenience (this is what .NET
StringBuilder.Appenddoes, for instance, if this counts on the basis thatStringBuilderis essentially a mutable string class) - y.prepend(x) to modify y, and possibly return the modified y as a convenience
- — Smjg (talk) 11:44, 19 December 2025 (UTC)
- I agree with your bullets. I think we should say something like this in the article. —Quantling (talk | 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
appendfunction. Subsequent edits have been a mishmash of:- Builtins in other languages called
appendthat do the same thing. - Implementations of array/list concatenation in other languages.
- Builtins to do the same in other languages that aren't called
appendat all.
- Builtins in other languages called
- 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. — Smjg (talk) 21:04, 22 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
- I agree with your bullets. I think we should say something like this in the article. —Quantling (talk | contribs) 16:04, 19 December 2025 (UTC)
- Quantling & Smjg: any further thoughts on this? It's been listed as a pending merger proposal for a couple months. Thebiguglyalien (talk) 04:37, 10 March 2026 (UTC)