Is it useful to use foo, bar, baz in examples?

My point was that this is the sort of response that foo/bar/baz is meant to forestall. Had you taken it at all seriously, I would have asked something about how we didn’t have proper units for spice zest, and maybe come up with something else as well.

The problem is that far too often, when we write an example like this, we have exactly that problem. People ask questions around the irrelevant details suggested by variable names. The metasyntactic variables are one solution to this. In the functional programming world, another common solution is to use single-character variable names, because any meaningful name is going to make suggestions that are not generic enough. For instance, this is a common looking signature in Haskell:

liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

The function gets a real name, liftA2. The typeclass Applicative gets a name. But the variables f, a, b, and c do not. John Degoes’ Descriptive Variable Names: A Code Smell makes this point in detail.

I am not trying to push people to use foo here, only to make it clear why programmers often use it.