why bar and foo



 DEVELOP > C > why bar and foo

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 2

1

 

2

 
Topic: DEVELOP > C
User: "Hans Schneider"
Date: 24 Jan 2008 08:07:19 PM
Object: why bar and foo
Why use people here bar and foo so much?
I tried google, but I have only found what they are, not why they are used.
My teacher says bar and foo are bad words.
Why people use them?
.

User: "Michal Nazarewicz"

Title: Re: why bar and foo 25 Jan 2008 09:17:14 AM
Hans Schneider <hans@localhost.localdomain> writes:

Why use people here bar and foo so much?

I tried google, but I have only found what they are, not why they are
used.

My teacher says bar and foo are bad words.

They are bad variable names if you use them in real code but for
documentations and examples they are fine and in fact better than
anything else because everyone is familiar with them.

Why people use them?

Why not? Besides, would you really want to coin some fancy name when you
write a 3-line example code in library documentation? I prefer using
foo, bar, baz, qux, quux and for numbers 42.
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--
.

User: "Keith Thompson"

Title: Re: why bar and foo 24 Jan 2008 09:08:54 PM
Hans Schneider <hans@localhost.localdomain> writes:

Why use people here bar and foo so much?

I tried google, but I have only found what they are, not why they are used.

My teacher says bar and foo are bad words.

Why people use them?

This really isn't a C question, but:
http://www.catb.org/~esr/jargon/html/F/foo.html
http://www.catb.org/~esr/jargon/html/B/bar.html
http://www.catb.org/~esr/jargon/html/F/foobar.html
I don't know why your teacher thinks they're "bad" words. One
possible derivation does refer to a word that's considered vulgar, but
that's far enough from the modern usage that it shouldn't matter.
For further discussion, try alt.folklore.computers (but browse the
group and/or check their FAQ first).
--
Keith Thompson (The_Other_Keith) <kst-u@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.

User: "Richard Heathfield"

Title: Re: why bar and foo 24 Jan 2008 11:05:26 PM
Hans Schneider said:

Why use people here bar and foo so much?

They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.

....and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to type.

My teacher says bar and foo are bad words.

Your teacher is mistaken. Does your teacher often make ex cathedra claims
without first doing a little basic research? If so, you probably need to
fire your teacher and hire a new one.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
User: "Nick Keighley"

Title: Re: why bar and foo 25 Jan 2008 03:54:25 AM
On 25 Jan, 05:05, Richard Heathfield <r...@see.sig.invalid> wrote:

Hans Schneider said:

Why use people here bar and foo so much?


They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.


...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to type.

I use pippo
--
Nick keighley
.
User: "Richard Heathfield"

Title: Re: why bar and foo 25 Jan 2008 04:07:45 AM
Nick Keighley said:

On 25 Jan, 05:05, Richard Heathfield <r...@see.sig.invalid> wrote:

Hans Schneider said:

Why use people here bar and foo so much?


They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.


...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to
type.


I use pippo

Which version, and for which platform?
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
User: "Sjouke Burry"

Title: Re: why bar and foo 25 Jan 2008 04:40:08 AM
Richard Heathfield wrote:

Nick Keighley said:

On 25 Jan, 05:05, Richard Heathfield <r...@see.sig.invalid> wrote:

Hans Schneider said:

Why use people here bar and foo so much?

They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.

...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to
type.

I use pippo


Which version, and for which platform?

Pippo from "Pippo the clown" ??
That platform os rather antique(~40 years)???
AND THIS IS OFF TOPIC SIR!!!!!!
.
User: "Martien Verbruggen"

Title: Re: why bar and foo 25 Jan 2008 05:35:52 AM
On Fri, 25 Jan 2008 11:40:08 +0100,
Sjouke Burry <burrynulnulfour@ppllaanneett.nnlll> wrote:

Richard Heathfield wrote:

Nick Keighley said:

On 25 Jan, 05:05, Richard Heathfield <r...@see.sig.invalid> wrote:

Hans Schneider said:

Why use people here bar and foo so much?

They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.

...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to
type.

I use pippo


Which version, and for which platform?

Pippo from "Pippo the clown" ??

<ot> If this is Pipo de Clown (met Mamaloe, Dikke Deur en Klukkluk), who
used to be on Dutch TV when I was a kid, then you're misspelling it. You
better go and fix your code before it notices.</ot>
Martien
--
|
Martien Verbruggen |
| The gene pool could use a little chlorine.
|
.
User: "Remo D. rdentato"

Title: Re: why bar and foo 25 Jan 2008 06:40:14 AM

Why use people here bar and foo so much?

They are metasyntactic variables...

I use pippo

Which version, and for which platform?

Pippo from "Pippo the clown" ??

Actually is "Pippo" as in "Pippo, Pluto, Paperino, Topolino, Minnie,
Qui, Quo, Qua". The names of Disney characters in Italian.
In Italy everytime a temporary names is needed, "pippo" is used (also as
a file name: "pippo.zip", "pippo.c", "pippo.doc") then the others,
according personal tastes.
.
User: "Nick Keighley"

Title: Re: why bar and foo 25 Jan 2008 06:56:14 AM
On 25 Jan, 12:40, "Remo D." <rdentato> wrote:

Why use people here bar and foo so much?

They are metasyntactic variables...

I use pippo

Which version, and for which platform?

Pippo from "Pippo the clown" ??


Actually is "Pippo" as in "Pippo, Pluto, Paperino, Topolino, Minnie,
Qui, Quo, Qua". The names of Disney characters in Italian.

In Italy everytime a temporary names is needed, "pippo" is used (also as
a file name: "pippo.zip", "pippo.c", "pippo.doc") then the others,
according personal tastes.

I have Italian collegues
--
Nick Keighley
.





User: "Mark McIntyre"

Title: Re: why bar and foo 25 Jan 2008 05:37:41 PM
Nick Keighley wrote:

On 25 Jan, 05:05, Richard Heathfield <r...@see.sig.invalid> wrote:

Hans Schneider said:

Why use people here bar and foo so much?

They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.

...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to type.


I use pippo

worked in France?
.


User: "Hans Schneider"

Title: Re: why bar and foo 25 Jan 2008 06:15:49 PM
Richard Heathfield wrote:

Hans Schneider said:

Why use people here bar and foo so much?


They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.


...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to type.

My teacher says bar and foo are bad words.


Your teacher is mistaken. Does your teacher often make ex cathedra claims
without first doing a little basic research? If so, you probably need to
fire your teacher and hire a new one.

Variable names and function names should say what they do.
Bar is a function is graphics.h (draw rectangle).
foo says nothing (says my teacher).
What purpose have variables and functions that have metasyntactic purpose?
.
User: "Peter Nilsson"

Title: Re: why bar and foo 25 Jan 2008 07:09:07 PM
Hans Schneider <h...@localhost.localdomain> wrote:

Variable names and function names should say what they do.

What does x do in (a * x * x + b * x + c)?
Sometimes naming identifiers after their purpose can
actually make code confusing, e.g. faux amis.

Bar is a function is graphics.h (draw rectangle).

It may be in one library that has a graphics.h header.

foo says nothing (says my teacher).

What purpose have variables and functions that have
metasyntactic purpose?

In pedagogic examples they serve to indicate that some
identifiers are incidental, and the reader should focus
on the example's main purpose.
--
Peter
.

User: "Ben Bacarisse"

Title: Re: why bar and foo 25 Jan 2008 06:52:31 PM
Hans Schneider <hans@localhost.localdomain> writes:

Richard Heathfield wrote:

Hans Schneider said:

My teacher says bar and foo are bad words.


Your teacher is mistaken. Does your teacher often make ex cathedra claims
without first doing a little basic research? If so, you probably need to
fire your teacher and hire a new one.


Variable names and function names should say what they do.
Bar is a function is graphics.h (draw rectangle).
foo says nothing (says my teacher).

Ah. Your teacher means that foo and bar are bad in real programs. I
agree. I don't think I've ever seen either one in a real program.

What purpose have variables and functions that have metasyntactic
purpose?

The point is to use them only when the meaning of the name would be a
distraction. In a perfect world every example would be a real one
with good meaningful variable names, but sometimes you just want to
show that you can't assign an array:
int foo[2], bar[2];
foo = bar; /* not allowed */
or that functions can be mutually recursive:
int foo(int x) { return x * bar(x - 1); }
int bar(int x) { return x > 0 ? foo(x / 2) : x; }
and so on. You use daft names only when a "better" name (and thus
it's meaning) would be distracting.
--
Ben.
.
User: "Hans Schneider"

Title: Re: why bar and foo 26 Jan 2008 09:15:15 PM
Ben Bacarisse wrote:

Hans Schneider <hans@localhost.localdomain> writes:

What purpose have variables and functions that have metasyntactic
purpose?


The point is to use them only when the meaning of the name would be a
distraction. In a perfect world every example would be a real one
with good meaningful variable names, but sometimes you just want to
show that you can't assign an array:

int foo[2], bar[2];
foo = bar; /* not allowed */

Yes, but what about using in real programs.
For example, the program from John J. Smith in the roman number thread.
It is > 100% unreadable!
.
User: "Richard Heathfield"

Title: Re: why bar and foo 27 Jan 2008 02:15:52 AM
Hans Schneider said:
<snip>

For example, the program from John J. Smith in the roman number thread.

It is > 100% unreadable!

When people ask comp.lang.c to do their homework for them, the result is
very often either unreadable or unprintable.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
User: "CBFalconer"

Title: Re: why bar and foo 27 Jan 2008 09:27:50 PM
Richard Heathfield wrote:

Hans Schneider said:

<snip>

For example, the program from John J. Smith in the roman number
thread. It is > 100% unreadable!


When people ask comp.lang.c to do their homework for them, the
result is very often either unreadable or unprintable.

Or amazingly inefficient. Or amazingly efficient. :-)
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com
.
User: "Charles Richmond"

Title: Re: why bar and foo 28 Jan 2008 04:07:58 PM
CBFalconer wrote:

Richard Heathfield wrote:

Hans Schneider said:

<snip>

For example, the program from John J. Smith in the roman number
thread. It is > 100% unreadable!

When people ask comp.lang.c to do their homework for them, the
result is very often either unreadable or unprintable.


Or amazingly inefficient. Or amazingly efficient. :-)

The really amazing thing is that somebody thinks *you* should
do their work for them, for appropriate values of "you". If
a person does his/her own C homework, and do it well or badly,
*no* one in <c.l.c.> will complain. I promise. :-)
--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
.
User: "Randy Howard"

Title: Re: why bar and foo 28 Jan 2008 10:03:34 PM
On Mon, 28 Jan 2008 16:07:58 -0600, Charles Richmond wrote
(in article <479E523E.3090602@tx.rr.com>):

CBFalconer wrote:

Richard Heathfield wrote:

Hans Schneider said:

<snip>

For example, the program from John J. Smith in the roman number
thread. It is > 100% unreadable!

When people ask comp.lang.c to do their homework for them, the
result is very often either unreadable or unprintable.


Or amazingly inefficient. Or amazingly efficient. :-)


The really amazing thing is that somebody thinks *you* should
do their work for them, for appropriate values of "you".

I'm not amazed by that at all. I had people ask me to "help them"
(translation: "do their homework for them") 25 years ago.
What /does/ amaze me is the geeks that are desperate to flex their
epeens will actually do the homework for these people. Not all of them
mind you. However, if these Future Creators of Fabulously Broken
Software ask enough times, and phrase things just right, invariably one
or more of these pathetic little creatures will hammer out something
good enough to snow the professor into a passing grade.
They even pretend to believe it when the one asking for help says "oh,
it's not homework, it's just a hobby for me", despite the question
wording being obviously cut and pasted from a handout or class website.
The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
User: "Martin Golding"

Title: Re: why bar and foo 29 Jan 2008 08:21:21 PM
On Tue, 29 Jan 2008 04:03:34 +0000, Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for them,
what happens?

I'll tell you what happens. If the fresh crop is sufficiently useless,
HR departments are a little more likely to obey the age discrimination
laws when an crusty competent old programmer knocks on their door.
It is in my selfish self interest to see to it that the upcoming crop
of programmers, _especially_ the breeders of the future stock for the
Indian offshores which seem to be the source of most of the recent
particularly egregious examples of bad programming, produce the least
number of the least competent programmers.
As (except for pleasant daydreams) I don't hold my self-interest above
the general good, I have avoided being part of the problem. I don't
hesitate to indulge in a bit of schadenfreude when someone else fails
to do so.
Apres moi, of course, le deluge.
Martin
--
Martin Golding | If everyone closed their eyes and visualized world peace,
Dod #236 KotLQ | imagine how quiet it would be until the looting started.
fogobum@comcast.net Vancouver, WA
.
User: "Randy Howard"

Title: Re: why bar and foo 30 Jan 2008 05:43:56 AM
On Tue, 29 Jan 2008 20:21:21 -0600, Martin Golding wrote
(in article <pan.2008.01.30.02.21.20@comcast.net>):


On Tue, 29 Jan 2008 04:03:34 +0000, Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for them,
what happens?


I'll tell you what happens. If the fresh crop is sufficiently useless,
HR departments are a little more likely to obey the age discrimination
laws when an crusty competent old programmer knocks on their door.

You moved the goalposts. :)
Note: "dead, retired, or incapable"
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.


User: "Charles Richmond"

Title: Re: why bar and foo 31 Jan 2008 08:28:02 PM
Randy Howard wrote:

On Mon, 28 Jan 2008 16:07:58 -0600, Charles Richmond wrote
(in article <479E523E.3090602@tx.rr.com>):

CBFalconer wrote:

Richard Heathfield wrote:

Hans Schneider said:

<snip>

For example, the program from John J. Smith in the roman number
thread. It is > 100% unreadable!

When people ask comp.lang.c to do their homework for them, the
result is very often either unreadable or unprintable.

Or amazingly inefficient. Or amazingly efficient. :-)

The really amazing thing is that somebody thinks *you* should
do their work for them, for appropriate values of "you".


I'm not amazed by that at all. I had people ask me to "help them"
(translation: "do their homework for them") 25 years ago.

What /does/ amaze me is the geeks that are desperate to flex their
epeens will actually do the homework for these people. Not all of them
mind you. However, if these Future Creators of Fabulously Broken
Software ask enough times, and phrase things just right, invariably one
or more of these pathetic little creatures will hammer out something
good enough to snow the professor into a passing grade.

They even pretend to believe it when the one asking for help says "oh,
it's not homework, it's just a hobby for me", despite the question
wording being obviously cut and pasted from a handout or class website.
The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?

When "all their little helpers are dead, retired, or incable of
doing the real-work asssignments for them", the little cretins
get laid off and their job is sent to China. But hey!!! That is
what will happen *anyway*. ;-) I *did* all my homework, and the
little squinty-eyed people *still* got my job...
--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
.

User: "Ian Collins"

Title: Re: why bar and foo 29 Jan 2008 08:25:27 PM
Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?

Us old and crusty contractors get a welcome boost to our retirement funds :)
--
Ian Collins.
.
User: "Richard Bos"

Title: Re: why bar and foo 30 Jan 2008 06:32:35 AM
Ian Collins <ian-news@hotmail.com> wrote:

Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?

Us old and crusty contractors get a welcome boost to our retirement funds :)

I fear that you old and crusty contractors will just have to use the
broken software that results from McProgrammers with McEducations,
because even if the McSoftwarecompanies cared, they would neither want
nor, probably, be able to pay your old and gem-encrusted conslutancy
fees.
Richard
.

User: "Randy Howard"

Title: Re: why bar and foo 30 Jan 2008 05:44:06 AM
On Tue, 29 Jan 2008 20:25:27 -0600, Ian Collins wrote
(in article <60a5gmF1ogcucU9@mid.individual.net>):

Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?

Us old and crusty contractors get a welcome boost to our retirement funds :)

You moved the goalposts. :)
Note: "dead, retired, or incapable"
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
User: ""

Title: Re: why bar and foo 30 Jan 2008 09:45:04 AM
In article <0001HW.C3C5BF270097F6D5F01846D8@news.verizon.net>,
Randy Howard <randyhoward@FOOverizonBAR.net> wrote:

On Tue, 29 Jan 2008 20:25:27 -0600, Ian Collins wrote
(in article <60a5gmF1ogcucU9@mid.individual.net>):

Randy Howard wrote:

The real concern is what happens down the road when every programmer
between the ages of 25 and 50 in the workforce is someone that went
through college getting all of their assignments done by some anonymous
geek. Once they get out there and realize all their little helpers are
dead, retired, or incapable of doing the real-work assignments for
them, what happens?

Us old and crusty contractors get a welcome boost to our retirement funds :)


You moved the goalposts. :)

Note: "dead, retired, or incapable"

In that case, the young and crusty programmers (like me) will have
become the old and crusty programmers who get the job (and the
retirement fund boost).
Maybe I should start doing peoples' homework for them? I've been
restricting myself to ones where the combined b0rkenness of the
problem-as-stated and my solution is above a fairly high threshold.
dave
--
Dave Vandervies dj3vande at eskimo dot com
I like "fun" risks, rather than "lazy" risks.
(If I'm going to kill myself, I want to have a good time on the way.)
--Graham Reed in the scary devil monastery
.







User: "santosh"

Title: Re: why bar and foo 27 Jan 2008 02:38:18 AM
Hans Schneider wrote:

Ben Bacarisse wrote:

Hans Schneider <hans@localhost.localdomain> writes:

What purpose have variables and functions that have metasyntactic
purpose?


The point is to use them only when the meaning of the name would be a
distraction. In a perfect world every example would be a real one
with good meaningful variable names, but sometimes you just want to
show that you can't assign an array:

int foo[2], bar[2];
foo = bar; /* not allowed */


Yes, but what about using in real programs.

[ ... ]
Don't use them.
.


User: ""

Title: Re: why bar and foo 28 Jan 2008 10:33:43 AM
In article <87ir1ho1bk.fsf@bsb.me.uk>,
Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:

Ah. Your teacher means that foo and bar are bad in real programs. I
agree. I don't think I've ever seen either one in a real program.

I have a few times, but not frequently.
If you're writing something like
--------
{ char *foo=strchr(s,'\n'; if(foo) *foo='\0'; }
--------
then the name "foo" actually does carry some information; it says
"Coming up with a meaningful name for this variable is not worth the
effort, since it doesn't escape this line of code and it's obvious from
the context what it's for".
Calling the variable something like "nl" would perhaps be more
meaningful once you've figured out that "nl" is short for "newline",
but even that is extra effort above reading the line of code to
determine what it does. The shortest path to understanding the code
still doesn't involve getting information from the name of the
variable.
Calling it "newline_at_end_of_string_if_it_exists" would make it
blindingly obvious what the variable is for, but the cost to
readability is unacceptable.
dave
--
Dave Vandervies dj3vande at eskimo dot com
BTW, bottlenecks are Good: Unless I can find one or a few, speeding up a
procedure/algorithm/program is _much_ harder.
--Terje Mathisen in comp.arch
.

User: "David Thompson"

Title: Re: why bar and foo 03 Feb 2008 08:21:23 PM
On Sat, 26 Jan 2008 00:52:31 +0000, Ben Bacarisse
<ben.usenet@bsb.me.uk> wrote:

Hans Schneider <hans@localhost.localdomain> writes:

My teacher says bar and foo are bad words.

Variable names and function names should say what they do.

Ah. Your teacher means that foo and bar are bad in real programs. I
agree. I don't think I've ever seen either one in a real program.

Borderline case: I've used them (and their friends) for temporary
debugging code in real programs. I wouldn't let anyone (probably
including you) see it until I finish debugging though.
<snip rest>
- formerly david.thompson1 || achar(64) || worldnet.att.net
.


User: "Mark McIntyre"

Title: Re: why bar and foo 26 Jan 2008 05:24:18 AM
Hans Schneider wrote:


What purpose have variables and functions that have metasyntactic purpose?

How about finding out what metasyntactic means?
http://en.wikipedia.org/wiki/Metasyntactic_variable
--
Mark McIntyre
CLC FAQ <http://c-faq.com/>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
.

User: "Eugene A. Pallat"

Title: Re: why bar and foo 28 Jan 2008 09:36:47 AM
This silly debate constantly makes the rounds. It's FUBAR.
The accronym stands for F****d Up Beyond All Recognition. It's been in use
since (at least) WW II.
Gene Pallat
Orion Data Systems
Orion Forensics
"Hans Schneider" <hans@localhost.localdomain> wrote in message
news:1954745.hMirdbgypa@aioe.org...

Richard Heathfield wrote:

Hans Schneider said:

Why use people here bar and foo so much?


They are metasyntactic variables...

I tried google, but I have only found what they are, not why they are
used.


...and people use them mostly because they're shorter than
"whatchamacallit", "thingummybob", and "dubrey", and thus quicker to
type.

My teacher says bar and foo are bad words.


Your teacher is mistaken. Does your teacher often make ex cathedra claims
without first doing a little basic research? If so, you probably need to
fire your teacher and hire a new one.


Variable names and function names should say what they do.

Bar is a function is graphics.h (draw rectangle).

foo says nothing (says my teacher).

What purpose have variables and functions that have metasyntactic purpose?

.




  Page 1 of 2

1

 

2

 


Related Articles
 

NEWER

pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER