71

In many programming languages, char is a type name for character values. The word character is pronounced with a [k] sound, but what about char?

While trying to find the answer elsewhere, I learnt that there is an English word char which is pronounced [tʃɑ:(r)], but it has nothing to do with characters.

How would you read the following piece of code out loud?

char a;

Is it [kær], [tʃær] or [tʃɑ:(r)]? I've always used the last but I have no idea whether it's correct.

tchrist
  • 134,759
  • 16
    This has no definitive answer. Some people pronounce it care while others pronounce it char. Some people say jif for "Gif" while others use the hard "g" there. I don't bother correcting anyone (although I do say care and gif myself). – Robusto Mar 05 '12 at 15:30
  • 2
    @Robusto: That, in itself, is an answer to my question. – Armen Ծիրունյան Mar 05 '12 at 16:02
  • 26
    I've never heard any native English speaker call the char datatype care or car. It's always pronounced as the first syllable in charming, despite the fact that it's obviously an abbreviation for character. – FumbleFingers Mar 05 '12 at 17:03
  • @FumbleFingers I 100% agree. char star rhymes. – Jim Mar 05 '12 at 17:17
  • 3
    @FumbleFingers I dont know if a regional bias comes here again. But most people, (using AmE), I have met, say "kar", since after all, it is the abbreviation of character, which is pronounced with 'k'. Its usage usually sounds like you set off to say 'character', but didnt utter the sounds attributed to the last 5 letters. – karthik Mar 05 '12 at 17:31
  • @karthik: Exactly. And then you have the cases where it's in combination with other syllables (charCode, charCodeAt, etc.) where pronouncing it FF's way seems very strange to my ear. – Robusto Mar 05 '12 at 17:35
  • I just asked the first five developers I ran across in my office and all pronounce it care. – Robusto Mar 05 '12 at 17:41
  • 1
    @Robusto: As I've said in the past, Americans tend to go for more "literal" spellings/pronunciations. Plus they drink Koffee where Brits have a nice cup of Cha, so maybe that explains your version. All I can say is I Googled "char datatype youtube" and listened to this guy. I had to listen to 1m 40s of his heavy American accent before he finally said "char", but there's no mistaking it's my version, not yours. – FumbleFingers Mar 05 '12 at 17:49
  • @Fumble: I'm not sure how my pronunciation is more literal. I'd call it more abstract. But all this just supports my original contention that the question cannot be answered definitively. – Robusto Mar 05 '12 at 19:04
  • 1
    @karthik In the US, "car" is the common name for any automobile, and the first thing that comes to mind. That's most likely why that pronunciation is avoided for "char". I switch between the "car" and "char"ming pronunciations based on my mood, and I don't own a car ;) – Izkata Mar 05 '12 at 19:09
  • 1
    @Robusto: I'm just saying that the hard "k", whether it's expressed as car or care, clearly derives from "literal" abbreviation of the pronunciation of character. I must admit I'm intrigued by your version though, since I really have never come across it. I know I'd have remembered - even reading about it here strikes me as odd, so if I actually heard it I'd positively fall off my perch. Well, not now perhaps, since I'm forewarned, but I think I'll check a few more youtube clips just for the quirkiness of hearing it (I'm prepared to believe you that I will find one fairly easily! :) – FumbleFingers Mar 05 '12 at 20:18
  • 1
    Also, I think the part about "reg" should be a separate question, so I am going to edit it out of this question and answer. Please feel free to start a new question on that matter. – nohat Mar 05 '12 at 20:41
  • @Robusto: Yes yes, and there are (a lot of) people who pronounce SQL as "sequel," despite Microsoft, MySQL, and ANSI all officially/only pronouncing it "S-Q-L." But I never correct anyone, especially database admins who would become bitter at me if I told them. – BlueRaja - Danny Pflughoeft Mar 05 '12 at 21:32
  • I was just thinking this very thing, as one of my very learned colleagues (a fellow database programmer) said "I made that column a car-ten" (for char(10)). I always say [tʃɑ:r] (bilingual native Canadian English speaker.) – msanford Mar 05 '12 at 21:35
  • 4
    Wouldn't Dennis Ritchie's pronunciation of it have to be correct? Unfortunately, I don't know what that is. – Peter Shor Mar 06 '12 at 01:47
  • 4
    FumbleFingers be careful when you say "always". i'm a programmer who has never, ever pronounced it any way beside like the first syllable of character (because it's an abbreviation for character ...) – user428517 Aug 11 '14 at 20:48
  • 2
    @PeterShor Dennis always said it as you might say charred toast. So did the rest of the labbies from Research at Murray Hill. You can ask any of those still alive what the cultural preference there was, like Doug McIlroy, Brian Kernighan, Ken Thompson, Rob Pike, Dave Presotto, Tom Duff, Andrew Hume, — or Bjarne Stroustrup, mentioned in a comment below. – tchrist Dec 09 '17 at 16:40
  • I've always pronounced "care", as the first syllable of "character". And I've been programming since 1968. But I've heard several other pronunciations. – Hot Licks Dec 09 '17 at 17:47
  • You have to consider that most programmers in the world speak English only as a second language, so many things in the programming world don't make 100% sense to native English speakers. – santiago arizti Dec 27 '17 at 16:42
  • Just a note as a long-time software engineer: When I first got started, the abbreviation didn't seem to exist conversationally until the C language showed up. Back then, they were mostly called tch-ar (don't ask me to learn IPA), even though I always called them "care". However that seemed to flip: Nowadays, the engineers I know all refer to them as "care", or "cares". BTW "gif" vs. "jif" flipped out there too. Seems like most folks are hard-G on that one now when at first they were not. – tgm1024--Monica was mistreated Jan 06 '20 at 21:23

5 Answers5

61

(Note this answer was previously posted to a question which has since been deleted on Programmers.stackexchange.com)


The abbreviated form char, short for character, can be pronounced in several different ways in American English: here's how you represent the various pronunciations in American English using the International Phonetic Alphabet:

  1. char as in char-broiled: /tʃɑr/
  2. char as in car: /kɑr/
  3. char as in character: /kær/
  4. char as in care: /kɛr/

For many speakers of American English (including myself), the /æ/ sound before /r/ is merged with the /ɛ/ sound. That is, the words marry and merry are pronounced the same. For these people, #3 and #4 are indistinguishably pronounced like #4. People with this merger are often confused if someone else tries to explain the distinction between #3 and #4.

I have heard all these forms used and as a descriptivist, I would make no attempt to declare any as “correct”. Each has different arguments for and against, which I will enumerate below.

  1. This form has the advantage of being “obvious”—that is, it is pronounced the way a naïve pronunciation of an unknown English word would be pronounced. It is also how the unrelated but identically spelled verb char is pronounced. On the downside, it preserves neither the initial /k/ sound nor the vowel of the word the abbreviation is derived from, character.
  2. This form maintains the initial /k/ sound from character but is otherwise pronounced as spelled. It does not preserve the vowel from character.
  3. This form maintains both the initial /k/ sound and the vowel from character. It is the most faithful to the source word. On the downside, /ær/ is not a phonotactically valid way for a word to end. The sequence /ær/ is only possible if there are additional vowels, as in marry or character. That is, if you say /kær/ as an independent word it is a violation of the normal phonotactic constraints of spoken English. Furthermore, it is a completely non-obvious pronunciation if you don’t already know that char is short for character and how character is pronounced.
  4. This form is very similar to #3, being quite faithful to the underlying form, but with the advantage of not violating the phonotactic constraint against words ending in /ær/. For people with the marrymerry merger, it is not actually perceived to be different from #3 at all. On the downside, it is a completely non-obvious pronunciation if you don’t already know that char is short for character and how character is pronounced. Also, if you do distinguish #3 and #4, then #4 does not actually have the same vowel as character.

Each possible pronunciation has its own set of advantages and disadvantages, which is why there is a diversity of pronunciation in the field—there is no form that is clearly better than all the others. Furthermore, the different possibilities are bound up in a dialectical difference that most speakers of American English are unaware of, so when discussions of how to pronounce char come up, often two people are talking about dialectical differences when what they think they are talking about is a lexical difference.

nohat
  • 68,560
  • 5
    I don't pronounce marry and merry the same, but I do pronounce care and _char_acter the same. It's definitely a very local accent thing, similar to how Chicagoans pronounce the "a" in Chicago differently than those who grew up in the west suburbs, less than an hour away. – Izkata Mar 05 '12 at 22:06
  • 1
    A superb answer. – Dan Moulding Mar 06 '13 at 16:40
  • @Izkata, that’s quite interesting. I would tend to pronounce marry and merry the same, but I pronounce care and char(acter) differently, just like I pronounce pair and par(achute) with different vowels (the former with [ɛ], the latter with [æ]). Or more parallel: carry [æ] vs. carey [ɛ] (as in ‘someone who cares’). – Janus Bahs Jacquet Jan 24 '14 at 18:02
  • In US English, many people do, in fact, pronounce "marry" and "merry" differently. The Americans you see on TV often have a flatter, West coast accent, where the two sound the same. In other words, it's a regional thing. – James Aug 03 '16 at 20:45
  • @JanusBahsJacquet Many us neutralize [æɹ], [ɛɹ], [eɪɹ], [eɹ], [eəɹ] to just plain [eɹ] is such syllables, and so /er/ is all we think of any of them as. – tchrist Dec 09 '17 at 16:45
28

I will reiterate what Bjarne Stroustrup has to say:

"char" is usually pronounced "tchar", not "kar". This may seem illogical because "character" is pronounced "ka-rak-ter", but nobody ever accused English pronunciation (not "pronounciation" :-) and spelling of being logical.

http://www.stroustrup.com/bs_faq2.html#char

5

While trying to find the answer elsewhere, I learnt that there is an English word 'char' which is pronounced [tʃɑ:(r)], but it has nothing to do with characters.

I'm certain that this is why many people say [tʃɑ:(r)]. To answer your question, I would say "[tʃɑ:(r)] a" when I read

char a;

I can't find the reference right now of course, but either one of my Java books or my teachers said that the person who thought of the char keyword pronounced it care because they were named/working with/obsessed with/father of someone named Karen.

nohat
  • 68,560
  • Thank you for your answer. I understand your choice of redge-edit, but I don't understand redge-ex. The latter comes from regular exptression, so why would you pronounce it as redge-ex? Is it a common pronunciation? o_O – Armen Ծիրունյան Mar 05 '12 at 15:49
  • I was just expanding on my use of 'redge' when I see reg words, like regex for regular expressions and regedit for registry editor. – cornbread ninja 麵包忍者 Mar 05 '12 at 15:51
  • @Matt, how did you do that? That type of look is what I wanted to use to quote the OP. – cornbread ninja 麵包忍者 Mar 05 '12 at 16:01
  • 3
    if you start a line with > then it will make the line a quote :) – Matt E. Эллен Mar 05 '12 at 16:05
  • Ohhh right. And see, I use that all the time when I provide dictionary definitions. It's Monday, alright. – cornbread ninja 麵包忍者 Mar 05 '12 at 16:26
  • I always say [tʃɑ:(r)], because I say char meaning tea as well, pronounced the same. I use redge-edit, but I say reg-ex. It makes sense to me, but it is clear that there re no hard and fast rules. – Schroedingers Cat Mar 05 '12 at 16:48
  • RE redge: If I see the boy's name "Reg", I pronounce it "rej" or "redj". But "regedit" I pronounce "reg-ed-it". Interesting. This leads me to what I am sure is a totally original observation: the relationship between English spelling and pronunciation is not entirely consistent. – Jay Mar 05 '12 at 20:16
4

RE "char", I agree with karthik: I pronounce it like the first syllable of "character". I've heard people pronounce it "char", that is, pronounce the "ch" as in "chair" and then "ar" as in "car". This does bring up the question why we spell the word "character" and not "caracter" or "karacter". I think we should start a movement to change that.

It never occurred to me before that this looks just like "char" as in "burn slightly". I pronounce that with "ch" as in chair. I suppose that's not all that surprising, there are other words that are spelled the same but pronounced differently, like "polish", "rub something to make it shine, and "Polish", the nationality, the former has a short "o" and the latter a long "o".

Oh, it occurs to me that most people I talk to pronounce the SQL type "varchar" as "var-car", i.e. pronounce the "char" part to sound like "car" as in automobile and the "var" part to rhyme with it.

But all of this is anecdotal. I doubt I've heard more than a few dozen people pronounce these words, and all in a few small groups so they might easily have influenced each other. And I don't think Google Ngrams has pronunciations to get any large scale statistics.

nohat
  • 68,560
Jay
  • 36,223
2

When reading code out loud, any phonetic pronunciation is for clarity of letter of the word, or more properly, the reserved word of the computer language. It is therefore separate and distinct from any pronunciation of the word it abbreviates.

Therefore: (American English) 'char' the 'ch' as in church, change, charge, and march; and the 'ar' as in car, far, mar, march, tar, and target;

or consider march, drop the m sound, and transpose the ar and ch for 'char'

I can not address how two (UK) English speakers would pronounce code. They may use the proper word instead of pronouncing the abbreviation.