30

What is the difference between concatenate and catenate?

Are the words interchangeable?

concatenate: 1. To connect or link in a series or chain. 2. Computer Science To arrange (strings of characters) into a chained list.
catenate: To connect in a series of ties or links; form into a chain.

Background: Which is more natural in the case of a C function like strcat(dest, src):

char* ConcatenateString(char* dest, char* src);  

or

char* CatenateString(char* dest, char* src);
Kris
  • 37,386
xmllmx
  • 2,698
  • This question appears to be off-topic because it is about naming (including naming variables and functions in programming). – Janus Bahs Jacquet Sep 05 '13 at 08:12
  • 2
    As Janus says, since this is a function name, as far as the English language is concerned you can name it Susan. I will add I think this is general reference to boot. – RegDwigнt Sep 05 '13 at 08:44
  • 2
    Although related, I would never use catenate in programming. The word used everywhere is concatenate – mplungjan Sep 05 '13 at 09:26
  • 2
    Although unrelated, I would never write my own strcat function when the C library provides a perfectly good one :-) –  Sep 05 '13 at 12:03
  • 2
    Reopening, based on the edits made. Original post was clearly off-topic due to the "no function naming" rule. But, with that gone, I agree with the other re-open voters: "general reference" is a stretch here - even after consulting two dictionaries, the difference between the two words is far from obvious to me. – Jaydles Sep 06 '13 at 14:31
  • After consulting two dictionaries, the lack of difference between the two words is obvious to me. They are the same word; one literally means "to chain together" and the other means "to chain" (without the "together" prefix, but in the exact same sense). – Hellion Sep 06 '13 at 14:42
  • Related: http://english.stackexchange.com/questions/91244/is-catenate-used-in-it-parlance – Bravo Sep 06 '13 at 15:21
  • 3
    in the APL programming language, the operation is called "catenate." –  Dec 01 '14 at 22:52
  • Note that the signature of a C function like strcat is inherently semantically ambiguous in exactly the relevant way: strcat(string1, string2) means "I want to mutate string1 to catenate it with string2", while strcat(buffer, string1); strcat(buffer, string2) means "I want to create a new string in buffer that is the contents of string1 and string2 catenated". – mtraceur Oct 26 '22 at 16:17

2 Answers2

19

I'm a programmer and concatenate would definitely be the standard and most natural-sounding term. But judging by the definitions of the terms, this seems to just be a matter of convention.

You could argue that all chains chain something together and thus concatenate is etymologically redundant, but concatenate has won out in modern English. Note that there are a few million Google hits for concatenate and less than a tenth of that for catenate.

  • 13
    Side note: Okasaki, in his famous Purely functional data structures book, consistently uses "catenate", but it's indeed one of the rare examples I have ever come by. – Clément Mar 24 '14 at 22:55
  • 7
    I came here because I was reading Purely Functional Data Structures and was trying to find out the difference between concatenate and catenate. Small world, at least where catenate is concerned. – Caleb707 Oct 24 '15 at 01:43
  • 3
    Ironically, the Unix command-line program to [con]catenate files is called "cat", rather than "con" or "concat". The man page for the Plan 9 implementation uses the term "catenate": http://man.cat-v.org/plan_9/1/cat, although Plan 9 appears to stand alone here. – Lorin Hochstein Sep 17 '17 at 05:14
  • 10
    The two terms are not interchangeable actually. concatenate means to catenate to self. This is why you don't see concatenate often in functional programming, it implies a side-effect – Neowizard Sep 13 '18 at 22:50
  • 3
    @LorinHochstein And even then, the Plan 9 man page gives up on "catenate" soon after: "cat file1 file2 >file3 concatenates the first two files and places the result on the third." Also, Okasaki brought me here, too. – Andrew Keeton May 21 '19 at 18:27
  • @Clément Notation as a tool of thoughts by Kenneth Iverson also uses "catenate" instead of "concatenate" – Wong Jia Hau Jun 06 '21 at 12:00
  • Dunno about you folks but from now on I'm saving a syllable and replacing that annoying word with "catenate" – iono Nov 30 '22 at 14:52
4

Based on @LorinHochstein's comment to @LukeBradford's answer

Let's break down concatenate

  • con means "with" but with what?
  • catenate. Oh okay so we are adding something to self (or this for the OOP programmers out there)

Catenate

We are adding pieces together, any pieces will do.

Con-Catenate

We are adding pieces together and since our current text (this) is the originator of the request it must become our root text so that other pieces will be added to this

Jacksonkr
  • 481