logoalt Hacker News

daharttoday at 3:15 PM2 repliesview on HN

Yes that’s the original spelling & meaning. But using the spellings foobar, foo, bar, and sometimes baz, have been used for decades in programming as examples, temporary names, stand-ins etc. I just assumed that spelling it foo was meant to distance it from the curse word slightly while simultaneously making the pronunciation more clear (i.e. foo not fuh); foo just makes a good nonsense word.


Replies

breatheoftentoday at 5:59 PM

I only just realized the z in foobaz stood for zork

wang_litoday at 8:52 PM

They are called metasyntactic variables and there’s a handful of them for English, but also standard ones in other language.

https://en.wikipedia.org/wiki/Metasyntactic_variable