Question

RAII (=resource acquisition is initialization) is used heavily in C++. I'm not a native speaker. So, how do you pronounce it?

Was it helpful?

Solution

FWIW I always say the letters R-A-I-I (arr eh eye eye).

Also, FWIW I've always hated that term - as Unfrozen Caveman Lawyer would say, it "frightens and confuses me".

The important thing is that the resource gets released when the object is destroyed. But that doesn't lead to any better acronym.

OTHER TIPS

Hmmm -- I'd say if you consider yourself more of an engineer, go with "I Triple E" like. On the other hand, if you think of yourself more as a pirate, how could you not LOVE:

ARRRRR a AYE AYE!

AR AY DUBL I

I avoid pronouncing it. If I do, I say "Resource Allocation Is Initialization".

There's no way to pronounce it, and even spelling it out is incredibly uncomfortable.

It's a terrible acronym for a very important feature. Why not just go ahead and make a better one and see if it catches on? Like... ARM (Automatic Resource Management), or Rhid (Resource Handled In Destructor).

Even Bjarne doesn't like the acronym RAII. Why stick with something everyone hates?

I generally pronounce it like I'm spelling it aloud.. R-A-I-I.

I have always wondered the same thing !!!

So two people suggests "the letters R-A-I-I (arr eh eye eye)"

One "IEEE like" (AR AY DUBLE I)

I pronounce RAII as "Ray". It's not the official pronunciation but 1 syllable is nice.

We shorten the long name to "RAII" when writing for communicating efficiently. When pronouncing acronyms, we should shorten as much as possible without losing meaning.

"eye triple ee" (for IEEE) does exactly that.

"ar ay eye eye" is way too long. Pronouncing consecutive vowels really slows you down.

"ar ay double eye" is still unnecessary long.

"Ray" loses meaning. Do you mean a software development technique, a comedian everybody loves, or a weapon from Star Wars? You don't want to confuse "death ray" with "death RAII"!

Ergo, you should pronounce RAII as "ray double eye".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top