Hacker News new | past | comments | ask | show | jobs | submit login

> They have absolutely no connection to the matter at hand. Since foo is often used before bar, you would think there is an ordering between the two but there doesn't have to be. They are hard to pronounce and easier to confuse.

I couldn’t disagree more. The entire point is that the variables are disconnected from the matter at hand. They’re widely recognised as placeholders, single syllable, distinctly pronounced from each other, and have an implied ordering.






> distinctly pronounced from each other

This isn't so much of an advantage for "bar" and "baz". Those sound pretty distinct to Americans, now, but "r" -> "z" is a known type of sound change, which implies that for some people they'll sound the same. "R" -> "s" is attested in Latin, presumably because "z" wasn't an option. (Latin fricatives don't have voicing distinctions.)

For an only slightly different current example, the second consonants in "virile" and "vision" are perceived as distinct in American English, but identical in Mandarin Chinese, which is why the sound is spelled as "r" in Hanyu Pinyin and as "j" in Wade-Giles.


Show me a phrase and I'll show you a language it doesn't work in.

Is there a language that identifies "ta" and "pa"?

I would agree with the comment you're responding to, too often in tutorials or especially in off hand comments here, I find their usage to assume some common but unindicated convention or subtext and obscure the concept they're trying to convey.

They’re the programmer equivalent of ‘x’ and ‘y’ in mathematics — which programmers don’t use as generic variables because they’re used for “math” embedded in code such as coordinates or measurements.

It’s the same idea that drove Lorem Ipsum for type setting placeholders.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: