Science & Tech — 20 July 2013


Submit to StumbleUpon Share

Why do programmers use foo

There are many unknown variables or words that you might come across in computer programming languages. And one such peculiar word is “Foo.” Many of you must be unaware of the term in programming language, as well as the reason why programmers use “Foo.”

Foo” or “Foobar” is a metasyntactic variable that is commonly used to represent an unspecified term, value, process, function, destination, or may be event. Sometimes it might be an abbreviation for “File or object.” It is combined with another term called bar and together known as “Foobar.”

Programmers tend to use the term “Foo” as a type of universal substitute for something real, like for discussing an idea or presenting examples. The basic example can be- Suppose you are defining a template to fellow programmers to follow when creating a new command, then the syntax you might for the command is in the form of “Command foo (arg1, arg2)”. Foo is just a non-sense type of placeholder or a programming jargon used for some value to define command.

Programmers use “foo” mainly to communicate publicly about programming and without using the programming words that you already know. Foo, being a metasyntactic variable gave full freedom to hackers and programmers for creating a logically named variable and the word “foo” is the canonical metasyntactic variable example.

Foo is often combined with other metasyntactic variables like “bar” and “baz” to make words like Foobar, Barbaz, and Foobaz. Eric Raymond has the world largest authority on “foo” and other metasyntactic variable like qux, waldo, fred, xyzzy and thud which are also occasionally used by programmers. So, now have a brief idea on “foo” and why it is used by programmers.

 

Written by Desh

With strong writing and copy editing skills, Desh Raj Sharma has shown expertise in almost every field of online content generation for years. Highly committed to his work, Desh is a person with clear heart, with no enmity with anything known.

About Author

With strong writing and copy editing skills, Desh Raj Sharma has shown expertise in almost every field of online content generation for years. Highly committed to his work, Desh is a person with clear heart, with no enmity with anything known.

(0) Share Your Views

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>