We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, some of you guys use "foo" as a name for a plain variable or a function. What is the meaning of "foo"?
Have a look here
www.hackersdictionary.com/.../foo.html
It means nothing; it is just used because some name is required, and there is no reason not to use it.
Because it has no meaning, it prevents any problems with people (mis)interpreting what they think it means!
Commonly used in example snippets - where it could equally be 'my_variable', 'fred', or anything else!
"What is the meaning of "foo"?"
en.wikipedia.org/.../Metasyntactic_variable
if one wished one's illustrative examples to be particularly verbose (or should I say pompous?), one might write:
void canonical_metasyntactic_function( void ) { int canonical_metasyntactic_variable; : // do stuff : }
rather than
void foo( void ) { int bar; : // do stuff : }
canonical_metasyntactic_'
I've looked at your example several times now and the first version is really growing on me as the names now have proper meaning.
beware of any "16 significant characters" limitations, though...
Oh, I just work around that by abbreviating it to "cm_var" and "cm_f". After all, everybody knows what really common abbreviations like these mean.
"beware of any "16 significant characters" limitations"
nah. Why bother with cryptic unix names?
void supercalifragilisticexpialidocious(foobar)
is such a nice name for a function! Never settle for a toolchain with less than 255 chars for identifiers!