26

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);
  • 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 5 '13 at 8:44
  • 2
    Although related, I would never use catenate in programming. The word used everywhere is concatenate – mplungjan Sep 5 '13 at 9:26
  • 2
    Although unrelated, I would never write my own strcat function when the C library provides a perfectly good one :-) – user45532 Sep 5 '13 at 12:03
  • 1
    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 6 '13 at 14:31
  • 2
    in the APL programming language, the operation is called "catenate." – user99730 Dec 1 '14 at 22:52
17

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.

| improve this answer | |
  • 9
    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
  • 5
    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. – Caleb Mauer Oct 24 '15 at 1:43
  • 1
    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": man.cat-v.org/plan_9/1/cat, although Plan 9 appears to stand alone here. – Lorin Hochstein Sep 17 '17 at 5:14
  • 5
    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
  • 1
    @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
1

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

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.