7

Metasyntactic variables are using in programming as placeholders. Wikipedia mentions several Japanese words used in this fashion, and I would like to know how they came about.

*this one seems obvious; it just repeats the first word twice.

3

There's one I can't find much about, but I think I've determined the basis for most of your list. Here it is, regrouped a bit:

  • ほげ - hoge
  • ほげら - hogera
  • ほげほげ - hogehoge
  • ふが - fuga
  • ぴよ - piyo

The first three are all variations on hoge. Digging around, this appears to derive from the verb hogeru, "a hole opens up, a hole appears; to fall apart". Since the metasyntactic variable is really a placeholder, or a kind of stopgap for the actual variable to be used in the programmer's own code, this hoge is a "hole" for the programmer to fill. Alternatively, since the "hole" meaning might be archaic or dialectal, this might arise instead from the "fall apart" sense as a sort of calque of the English metasyntactic variables foo and bar, presumably from fubar in reference to things having "fallen apart" (rather dramatically).

Hogera would then be hoge + suffix -ra, often used as a pluralizer or generalizer (as in kochira, sokora-hen, etc.).

Hogehoge, as you noted, is just hoge reduplicated.

Fuga, meanwhile, looks like half of fugafuga, "blathering, spluttering". As a generic term of "something that doesn't have any particular meaning of its own", this makes sense to use as a metasyntactic variable name.

Lastly, piyo only shows up, as far as I can tell, in piyopiyo as an onomatopoeia for the sound of chicks chirping or tweeting. This might be used in a similar fashion as fuga, as "something that doesn't have any particular meaning of its own".

That said, the above is only my best guess based on the minimal research I've done to date. I haven't found a source that clearly states, "this metasyntactic variable name comes from XYZ..." for any of the above. The Japanese Wikipedia article on メタ構文変数 explicitly mentions hoge and piyo, but about their origins, it only states that 「起【き】源【げん】は定【さだ】かではない」 ("the origins aren't certain").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.