Pronunciation of things from Rust

How do you pronounce &str?
Is enum pronounced e - num, e - noom, or eh-num?
How do you pronounce eq in assert_eq?
How about println!()?
What about std?
Is the ampersand (&) symbol for you pronounced "ref," "amp," "and," "slice," or simply nothing?
Do you not say the "!" macro symbol, or do you say "bang"?
If there are multiple pronunciations, which is likely, then how would you pronounce it?

9 Likes

I'll claim no authority, just my own preference:

  • &str: like "stir", or rarely "ref stir"
  • enum: ee-numb
  • assert_eq: spelled out "assert-e-q" or expanded "assert equal"
5 Likes

My preferences:

  • &str as /'stɜr rɛf/ (stir ref)
  • enum as /'inʌm/ (ee-numb)
  • eq as /'ik/ (eek)
8 Likes

I pronounce &str the same, but enum becomes /ɪˈnum/ to match "enumerate" /ɪˈnuməɹeɪt/ itself.

I'm sorry, but I can't actually tell if you're using a long or short "U" there.

1 Like

Short -- I'll edit my response to "numb". I know that pronunciation that doesn't match "enumerate", but I think I've always said it this way.

12 Likes

I say ee-num (num as in number), stir or ampersand stir, and "assert eek."

3 Likes

I pronounce &str like @cuviper, enum like @notriddle, and assert_eq like @cliff :‌P

that is: "stir", first syllables of "enumerate", "assert eek"

2 Likes

Reading code to myself, "&str" sounds like "and borrow a string slice" in unfamiliar code and turns into "and stir" in code I'm close to. enum is "ee nom". assert_eq is "assert equal".
Unless I was specifically telling someone exactly what to type ("ampersand ampersand" ?awkward!), I think I prefer conceptual clarity in spoken code ~ "assert equal" "and borrow" "logical and" communicate idea and intent.

1 Like

&str

ey-ess-te-er, more rarely "ess-per-luet ess-te-er"

enum

ey-numb

eq in assert_eq?

Ek.

Sorry am French. :slight_smile:

7 Likes

Sadly I don't have any other Rust programmers around me to speak Rusty with. So the question of how to pronounce things has never occurred to me.

In my mind I imagine:

'enum' pronounced as eenum. With the 'e' as in 'week'.

'eq' pronounced as 'eek'. Again with the 'e' as in 'week'.

I was somewhat confused to hear 'str' pronounced as 'stir' a while ago on some YouTube presentation on Rust.

Coming from the UK and having used C a lot people have always pronounced things like 'strlen' with the 'str' sounding as it does in 'street' or 'strap' or, well, 'string'.

I guess that is an American vs English thing.

1 Like

I’m not native English speaker.

• “an’ es tee arr”
• ee-num
• assert equal

1 Like

This is something fun - I claim no correctness, these are just what I say in my head when I type them out:

  • How do you pronounce &str? → and stir
  • Is enum pronounced e - num, e - noom, or eh-num? → ee - num, /ɘnəm/
  • How do you pronounce eq in assert_eqe-q, as in the names of the two letters. Sometimes just equal.

That's it. Some other things, for fun - how do pronounce these? Not all are exacltly rust related

  • WebAssembly, when you read Wasm. Is it wah-sum, w-a-s-m, or do you just read 'web assembly'?
  • SHA, as in SHA3 or SHA256. is it s-h-a, shay, shah, or something else?
  • println! - I know it's print line, but I'll often read it as print-lin, or just print.
  • What about fn as in function? Do you read it as fun, fn (like just together, no real vowels), f-n, function, fin, or something else?
  • How about impl as in implement? do you read it impleh, impul, implah, the full 'implement', or as something else?
  • What about toml, as in Tom's Obvious markup language? tomul? t-o-m-l?
  • fmt as in format? do you read it f-m-t, fumpt (just me?), format, etc.?
  • What about mut as in mutable? mute, mutt, mutable, something else?

I'm sure there are some more, and some of the above may seem obviously wrong ('fumpt'! who pronounces it 'fumpt'?), but those are some pronunciations I've always wondered about. Like s-q-l vs sequel, talking about tech whose names you've never pronounced aloud can be quite interesting.

Aside: I read &x as and x, which is short for 'and borrow an x [slice]' - &mut x is 'and mutably borrow an x [slice]'. As a longer example, I read, fn foo(name: &str, bytes: Vec<u8>) -> Result<A, B> ... as 'fun foo takes name, an and-stir, and bytes, a vec-you-eight, and produces a result of a or b'.

2 Likes

Considering &str is Ampersand + hamster, it only makes sense to create a portmeanteau word:
Amp + str, which obviously becomes...

"hamster".

That makes it very easy to differenciate with a String!

5 Likes

Whenever I talk out loud about &strs I talk about "string slices".

10 Likes

Surprised nobody has brought up the lifetime syntax 'a. I say "tick A" in that case. What do you say?

4 Likes

and-struh, ee-num (as in number), assert-ehk, occasionally followed by "bang"

for @slightknack's list

  • waz-um
  • shah
  • print line, or print line bang
  • fen
  • imp-uhl
  • toh-muhl (also yah-muhl, kuh-duhl, and of course jason. but! ech-tee-em-el)
  • fmt is format. format! is format bang
  • mut is hard cause i pronounce it as if it was "mute" in french. the vowel y in latin, not like m-iu-t

also:

  • std is stand
  • u8 is u8 in number contexts, and byte otherwise
  • [x] is arr x, &[x] is either and-arr x or sliced x
  • -> is ret
  • * is pointer or point, or deref. &* is and-ref, *& is deref-and, && is and-and, ** is double-dee. Unless it's the boolean (just "and") or the power of operator ("exp")
  • 'x is usually (stop) x where I put a pause or a gnashing of teeth before the x instead of the '
  • fn eat(food: Food, cutlery: &Instrument) -> Result<()> is fen eat args food typed food and cutlery typed and instrument ret result empty
  • trait generics where the type label is obvious generally have it silent, so deref to byte, not deref targetequal byte
  • Arc is Ark, Rc is arr-cee
  • OsString is oss string (and oss struh), CString is cee string (and cee struh)
  • hex numbers start with oh-ex, binary with oh-bee. intra-number underscores are silent.

etc etc

4 Likes
  • "WASM" rhymes with "chasm" (so, /wæzm/)
  • "SHA" rhymes with "spa" (so, /ʃa/)
  • println! -- not sure, finding it difficult to transcribe how it "sounds" in my head
  • fn with no vowel (so, /fn̩/)
  • impl rhymes with "simple" (so, /ɪmpl̩/)
  • "TOML" rhymes with "pommel" (so, /tɑml̩/)
  • not sure about fmt
  • mut like "mute" (so, /mjut/)
3 Likes

OK. You win. Or at least you made me laugh out loud.

"tick x" is just boring by comparison. :laughing:

4 Likes

a pause or gnashing of teeth

Inspired by Klingon?

How do you pronounce &str ?

I say "string slice".

Is enum pronounced e - num, e - noom, or eh-num?

I say "e-num". Although it's short for "enumeration" which is pronounced, "e-noom-eration", there are other words in English which have standard pronunciations of the shortened version which are different from the full word. E.g. most people I've talked to pronounce "bin" as in "/usr/bin" like "bin" and not "b-eye-n" even though it's short for "binary".

How do you pronounce eq in assert_eq?

That's one of those things that I usually say the full name of - "assert equals". Same goes for some time-related methods in chrono like as_secs() - I say "as seconds" since my inner 5 year old makes it awkward otherwise.

1 Like