954,064 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

$foo == $bar ?

Hello everyone. Does anyone know why Unix developers seem to have an obsession with the words foo and bar? Anyone who has read many Unix manual pages or the official Perl documentation will know what I mean. They appear as example variable or parameter names all over the place! Maybe it has somthing to do with FUBAR (**cked Up Beyond All Recognition) :p .

Steven.

Mushy-pea
Posting Whiz in Training
275 posts since Jun 2006
Reputation Points: 47
Solved Threads: 1
 

>Does anyone know why Unix developers seem to have an obsession with the words foo and bar?
http://catb.org/jargon/html/M/metasyntactic-variable.html

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Would you rather have them use programmer and computer ?

:twisted:....

void programmer::do_something() {

   if (feeling_bored()) {

      this->my_computer.use();
   }
.
.
.
}
John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

They can use whatever they feel like using. However, if I ever get around to writing a programming language you'll find the docs look a bit more like this:

if ($beer == $wine) {print "Everything tastes the same these days"}
or if ($whisky == $vodka) {print "I never liked vodka."


Steven.

Mushy-pea
Posting Whiz in Training
275 posts since Jun 2006
Reputation Points: 47
Solved Threads: 1
 

You have a syntax error at vodka."

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

That's assuming the language parses like most other languages... ;)

Infarction
Posting Virtuoso
1,580 posts since May 2006
Reputation Points: 683
Solved Threads: 53
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You