Pronunciation of data types

I recently heard Brian Kernighan pronounce the type char as if you would say the word "character" but stop after the first 'r', like 'care'.

I'm german and I always pronounced it almost like "jar". It's the common way to pronounce it over here, but I believe I heard english speaking programmers pronounce it this way, too.

So, I was surprised that The Man himself pronounced it in a way I've never heard before?

Is this just a german ignorance thing ("I bronounce zeh zings how I wunt"), or are there different pronunciations?
In my experience, other developers pretty much always pronounce the "ch" as in "child, i.e. not like it is in "character". It's not just a German thing.

(And if C had been written by Germans, rather than Anglophones, it would be "Datatypethatisasinglebytethatcanbeusedtorepresentanalphanumericcharacteroraninteger")

:P
Last edited on
closed account (48T7M4Gy)
http://www.stroustrup.com/bs_faq2.html#char


I'm german and I always pronounced it almost like "jar"

Perhaps not a good choice to describe how Germans pronounce it Ja? :)
Last edited on
(And if C had been written by Germans, rather than Anglophones, it would be "Datatypethatisasinglebytethatcanbeusedtorepresentanalphanumericcharacteroraninteger")

Yeah, probably :))

We actually do have a German word for that data type which fits the stereotype:
"Einzeltextzeichen" which means "single text symbol", although nobody uses it.
closed account (48T7M4Gy)
Einzeltextzeichen ... although nobody uses it


Probably because nobody can remember how to spell it.
I pronounce char as "care" because it is short for "character", but almost everyone who doesn't think of that when they learn programming pronounces it like "charcoal" or "charred". A common joke using this misconception is
char izard;
kemort wrote:
http://www.stroustrup.com/bs_faq2.html#char
This answer has always confused me, I don't understand how to pronounce "tchar" - is he just dodging the question?
Last edited on
closed account (48T7M4Gy)
This answer has always confused me, I don't understand how to pronounce "tchar" - is he just dodging the question?


My guess was he is pronouncing it as 'char' as in 'charcoal'. The easy way to remember is we sit on a 'chair' not a 'care'.
As confusing as English is, I'll just stick to shortening the word it's based on rather than trying to look at how other words do it :)
just say a byte...
std::uint8_t is "a byte". char is for characters, e.g. human-readable text. You should never use one when you mean the other.
> std::uint8_t is "a byte".

As far as C++ is concerned, a char, signed char or unsigned char is a byte.

The fundamental storage unit in the C++ memory model is the byte.
...
The sizeof operator yields the number of bytes in the object representation of its operand.
...
sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1.

-IS


Note: std::uint8_t is optional (need not be supported by an implementation).
What about networking code and binary portability? I only make such a distinction for this reason.
Last edited on
> What about networking code and binary portability?

Most RFCs use the term octect to refer to a sequence of eight bits.

For instance: RFC 2616 (HTTP/1.1)
2.2 Basic Rules
...
OCTET = <any 8-bit sequence of data>
...

A few state at the outset that the term byte is used in the documentas a synonym for octet

The unit byte is platform-dependent and has represented various storage sizes in the history of computing. However, due to the influence of several major computer architectures and product lines, the byte became overwhelmingly associated with 8 bits. This meaning of byte is codified in such standards as ISO/IEC 80000-13. While to most people today, byte and octet are synonymous, those working with certain legacy systems are careful to avoid ambiguity. - wiki
Topic archived. No new replies allowed.