Re: The worst 'hello world' example ever written...

D

David B. Held

The_Sage said:
[...]
I have challenged you several times to show statements by
any of those organizations claiming that their compilers are
less than 100% conforming. They say they conform, therefore
they are conforming.

So if a company says their drug will make your penis bigger,
it will? Let's eliminate the FTC, then, since commerce fraud is
just an imagined evil, according to you. Marketing depts. must
absolutely love you.
If you want to make up new definitions for words so that
"conforming" now means "almost conforming", go right ahead,
but don't be surprized if no one ever take anything seriously
that you ever say from then on.

Ok, I'll say it. When MS, IBM, and Borland say their compilers
"conform to the ANSI C++ standard", they mean "almost
conform". How do I know? Well, several reasons. First, I've
used MS's and Borland's compilers, and I have seen first-hand
how they do not conform. Second, with each new version, each
vendor promises a compiler that is "more conforming" than the
last. How that is possible if they already have 100% conformance
is beyond me. Third, well-known libraries composed of well-
formed C++ do not compile without workarounds or bugs on
any of those compilers. Go to www.boost.org, for instance, and
show me which of the libraries which do not pass 100% of the
regression tests for the stated compilers contain ill-formed code
that actually should not compile, even though the authors and the
community say otherwise.

Anyone who can't take me seriously for having said that, feel
free to make yourself heard. It's obvious that you are not a
serious C++ programmer, as any programmer who has had to
deal with any of those compilers at length would be intimately
acquainted with non-conformities in those toolsets. As an
exercise, feel free to visit the newsgroups which support any
of those compilers and read a few messages to see how
"conforming" they really are. You'll probably even see a few
messages from company reps saying: "Yeah, our compiler doesn't
support feature X properly [or at all]", where 'feature X' is a
requirement for conforming implementations.

Dave
 
D

David B. Held

The_Sage said:
[...]
That proves nothiong expect there are alot of people who resort
to the logical fallacy of appeal to authority.

While in arguments about natural law an appeal to authority is
inappropriate, in arguments about crafted standards, an appeal to
authority is absolutely apropos. For instance, the US Code is a
crafted standard, and I would like to see you tell a judge that
referring to a precedent-setting Supreme Court decision is a fallacious
"appeal to authority". The C++ standard is not a natural entity or
concept, and thus it is perfectly legitimate to appeal to the authority
of those who control it and choose its direction.
The standard allows room for other types, whether deliberately
or not,

It does so explicitly, and thus, deliberately. What it does not allow
for is other *return types* for main(), as has been explained to you
so many times that one begins to wonder what planet you are from,
and how it is that you can write apparently well-formed English
sentences without being able to parse one special one.
and many major compiler makers use additional types.

Many major compilers are not conforming C++ implementations.
Whether they like it or not, the standard needs to conform to what
the user needs, not what Herb or you want.

The standard does conform to what the user needs. That's why there
is a standards committee...to determine what users need, and change
the language appropriately. There has not been a proposal to support
void main(), that I know of, which is probably because users don't
feel that lack of such support hurts the writability or readability of
their programs. This is the first time I have seen someone argue
that we *need* to support "void main()". Perhaps you have a
compelling use-case in mind?

Dave
 
W

WW

The_Sage said:
You didn't answer the question. I take that as an admission you have
no clue.

I did answer your question, more than 5 times. Now please take your copy of
the standard and look at Chapter 28 and let me know what it says about the
main function. Unless you do this, everyone will clearly know here: you
have no standard and you have no clue.
 
W

WW

The_Sage said:
I have challenged you several times to show statements by any of those
organizations claiming that their compilers are less than 100%
conforming. They say they conform, therefore they are conforming.

I claim I am right. Therefore I am right. Therefore you are wrong.
 
A

Agent Mulder

don't be surprized if no one ever take anything seriously that
you ever say from then on.
</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats. I am fighting an even more futile case in C++. A
quine (program that outputs its own source code) that contains
an empty file does compile to an .exe. You expect such a program
to output nothing, thus satisfying the requirement, but it crashes.

-X
 
W

WW

Agent said:
</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats. I am fighting an even more futile case in C++. A
quine (program that outputs its own source code) that contains
an empty file does compile to an .exe. You expect such a program
to output nothing, thus satisfying the requirement, but it crashes.

No. C++ is what *all* C++ compilers eat. void main is not such.
 
W

WW

The_Sage said:
That proves nothiong expect there are alot of people who resort to
the logical fallacy of appeal to authority. The standard allows room
for other types, whether deliberately or not, and many major compiler
makers use additional types. Whether they like it or not, the
standard needs to conform to what the user needs, not what Herb or
you want.

THE SAGE IS DESPERATELY TRYING TO SLIP THE TOPIC!

The *only* thing defining this language is the standard. You had two
claims: one is that Microsoft states that void main is standard C++. The
second, that the standard says that void main is standard C++. You try to
slip the topic now, BUT: the SPOKESMAN of MICROSOFT tols you they do NOT
claim void main to be standard. The CONVENER of the C++ COMMITTEE todl you
that the standard does NOT allow void main to be accepted as well-formed
C++. So far all of your "arguments" are out.

It is useless to try to slip the topic to be one about authority and crap
like that. You have been the one in the first place, who has tried to bring
in authority bames like MS, and Borland and IBM to support his claims
(regardless that they don't). So accept your defeat and get back to abusing
cats of whatever you do for a living.
 
A

Agent Mulder

</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats. I am fighting an even more futile case in C++. A
quine (program that outputs its own source code) that contains
an empty file does compile to an .exe. You expect such a program
to output nothing, thus satisfying the requirement, but it crashes.
</>

No. C++ is what *all* C++ compilers eat. void main is not such.
</>

A long-standing debate in sociology is over the "is/ought" question. You
are heavy on the "ought" side, of what C++ ought to be. To allow me
a metaphore, you are tied in a cave looking at the perfect shadows that the
ANSI/ISO C++ standard casts on the wall, while behind your back we
carry around stuffed bears and limp rabbits. Don't be suprised when someone
slips down a slimy snale in your neck from time to time, just to see you start.

-X
 
W

WW

Agent said:
</>

A long-standing debate in sociology is over the "is/ought" question.
You are heavy on the "ought" side, of what C++ ought to be.

If I need/want to be judged I will asked you to judge me.
To allow me a metaphore,

I don't. You have *completely*(!) and deliberately misunderstood what I
have said.
you are tied in a cave looking at the perfect shadows
that the ANSI/ISO C++ standard casts on the wall,
while behind your back we carry around stuffed bears
and limp rabbits.

You must have some mental problems.
Don't be suprised when someone slips down a
slimy snale in your neck from time to time, just
to see you start.

So now would you PLEASE READ what I WROTE and PUT ASIDE YOUR PRECONCEPTIONS
and READ WHAT I WROTE NOT WHAT YOU THINK I WANTED TO WRITE????????

I said:

"No. C++ is what *all* C++ compilers eat. void main is not such."

Where do you see ISO standard here? You came in saying the "real world C++"
is what YOUR compiler eats. I have said that it is WRONG. Real world C++
is what ALL compilers eat. ALL we EVER need to support. And that RULES OUT
language features NOT ADDS.
 
G

Greg Comeau

</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats. I am fighting an even more futile case in C++. A
quine (program that outputs its own source code) that contains
an empty file does compile to an .exe. You expect such a program
to output nothing, thus satisfying the requirement, but it crashes.

With some compilers, you must get in touch with their linker side.
If not, as you note, it crashes.
 
G

Greg Comeau

</>


</>


</>

A long-standing debate in sociology is over the "is/ought" question. You
are heavy on the "ought" side, of what C++ ought to be. To allow me
a metaphore, you are tied in a cave looking at the perfect shadows that the
ANSI/ISO C++ standard casts on the wall, while behind your back we
carry around stuffed bears and limp rabbits. Don't be suprised when someone
slips down a slimy snale in your neck from time to time, just to see you start.

I think WW accepts that vendors can have extensions and such,
and that real code does often need to use said non-conforming aspects.
But he's also saying that saying those "modes" are Standard C++
is quite a different thing, since saying that doesn't make sense.
 
G

Greg Comeau

I have challenged you several times to show statements by any of those
organizations claiming that their compilers are less than 100% conforming. They
say they conform, therefore they are conforming. If you want to make up new
definitions for words so that "conforming" now means "almost conforming", go
right ahead, but don't be surprized if no one ever take anything seriously that
you ever say from then on.

If we're talking about conforming to Standard C++, then it's
a fact that compilers such as IBM, MS and Borland are not
conforming. In particular, they are each missing some obvious
template features, among other things.

If we're talking about what vendors say, there have been times,
even before Standard C++, that each of the above vendors website
said they conformed, go figure.
 
W

WW

Greg Comeau wrote:
[SNIP]
I think WW accepts that vendors can have extensions and such,
and that real code does often need to use said non-conforming aspects.
But he's also saying that saying those "modes" are Standard C++
is quite a different thing, since saying that doesn't make sense.

I have said even more. If portability betwen implementations of the
language is a requirement one has to restrict his toolkit of language
features to those, which are suported and mean the same thing on all
implementations to be used.
 
R

Randall Hyde

Agent Mulder said:
</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats. I am fighting an even more futile case in C++. A
quine (program that outputs its own source code) that contains
an empty file does compile to an .exe. You expect such a program
to output nothing, thus satisfying the requirement, but it crashes.

Well, "Borland C++" is what the Borland compiler eats.
"Microsoft C++" is what the Microsoft compiler eats.
"IBM C++" is what the IBM compiler eats.

However, the argument is about *Standard C++*.
Unfortunately, very few C++ compilers eat that.
The problem with vendor extensions like "void main"
is that some vendors may choose to eat such garbage
while other choose not to. If portability between compilers
is a desirable thing, you want to stick with the standard.

TS is trying to argue that "void main" *is* standard C++.
This is not true as the standard clearly states otherwise.
The standard doesn't *prevent* some vendor from
allowing this (as long as they issue a diagnostic), but
it explicitly states that such *programs* are not *standard*
C++ programs.

Then again, I've yet to see a C++ compiler that will accept
TS' C++ code with a "}" terminating the statement rather than
a ";" (and, of course, TS has refused to post the output of
a compiler that *does* accept this syntax, and, in fact, he
has quietly let that point drop from the debates - a sure sign
[to those who've seen him debate in the past] that he realizes
he was completely wrong on this point). The amusing part to
all of this is that the original code posted was claimed to be
a syntactically invalid C++ program. TS has a marvelous way
of misdirecting the original argument into areas that ignore
the original question. He cannot defend the fact that the
Hello World program he posted was syntactically incorrect.
So he changed the arguement to something he could debate
all day long about - this nonsense about "void main".

So to answer the real question, "no, no known compiler
accepts the code he posted." So even the populist
"The LANGUAGE is defined by what a compiler accepts"
argument fails to provide any support for TS's claims
about this Hello World program being a valid C++ program
(standard or otherwise).
Cheers,
Randy Hyde
 
R

Randall Hyde

WW said:
The_Sage wrote:

THE SAGE IS DESPERATELY TRYING TO SLIP THE TOPIC!

Ah.
People from the comp.lang.c++ newsgroup are catching on to TS'
debating style. This is his MO, straight down the line.

I would also point out that we haven't heard about that missing semicolon
for quite some time. This is a clear indication that TS has realized that
he is completely wrong and cannot provide any support whatsoever
for his claim that the C++ language accepts "}" in place of ";". So he
find something else to argue about and let that debate slip into obscurity.
Soon, the whole issue of "void main" we be sufficiently obfuscated that
he'll be able to let that one drop as well.

"Facts" stated by TS:

1. cout is a reserved word in the C++ language
2. cout << "hello world" (or thereabouts) involves no function calls to "hidden code".
3. "}" can be used in place of ";" at the end of a statement.
4. #include <iostream.h> is standard C++
5. void main is valid C++
6. You don't have to use namespaces to use the "cout" reserved word in standard C++.
7. Extra whitespace makes a difference to standard C++ (i.e., if you insert an extra
newline between "hello world" and the "}", then this is not syntactically valid, requiring
a semicolon, but if you leave that extra newline out, the result is syntactically valid).

Obviously, TS' arguments are so ridiculous that it's not even funny.
Then again, they are so, so ridiculous, that the fact that they are not even funny
*makes* them funny.

Anyone who offers the least bit of support to *anything* TS has to say puts
their reputation in great peril :)
Cheers,
Randy Hyde
 
D

David B. Held

Agent Mulder said:
don't be surprized if no one ever take anything seriously that
you ever say from then on.
</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats.
[...]

So if I write a compiler that accepts every well-formed Java program,
and I call it a C++ compiler, and say that it's conforming, then I am
allowed to say that C++ is also a superset of Java? That's nonsense.

Dave
 
D

David B. Held

Randall Hyde said:
[...]
"Facts" stated by TS:

1. cout is a reserved word in the C++ language
2. cout << "hello world" (or thereabouts) involves no function calls
to "hidden code".

Wow. I didn't see this one. That is really funny! Although, technically,
I do believe that you could argue this for a suitable definition of
"hidden code". For instance, the compiler is allowed to recognize
calls to ostream::eek:perator<< on std::cout, I believe, and implement
them in any way it sees fit, including inserting the appropriate machine
code without referring to any libraries. But I doubt Ol' Tumbleweed
would be able to make this argument.
3. "}" can be used in place of ";" at the end of a statement.
4. #include <iostream.h> is standard C++
5. void main is valid C++
6. You don't have to use namespaces to use the "cout" reserved
word in standard C++.
7. Extra whitespace makes a difference to standard C++ (i.e., if
you insert an extra newline between "hello world" and the "}",
then this is not syntactically valid, requiring a semicolon, but if
you leave that extra newline out, the result is syntactically valid).

Yeah, this one was pretty funny too. I still haven't seen any compiler
output that proves that even some compiler implements this "feature".
[...]
Anyone who offers the least bit of support to *anything* TS has
to say puts their reputation in great peril :)

Well, "Agent Mulder", another brave soul that signs his posts with
his real name, seems to think that if any C++ compiler accepts
programs with any of these "features", that that makes the features
"C++". Here's my C++ compiler I call it "The Sage/Mulder C++
Compiler, Version 1.0". It's very liberal:

// Copyright (C), 2003, David B. Held. This code is public domain.
#include <iostream>
#include <string>

int main()
{
int lines = 0;
while (std::cin)
{
++lines;
std::string code;
std::getline(std::cin, code);
}
std::cout << "Compiled " << lines << " lines, 0 errors." << std::endl;
}

And here's my marketing bit for it:

"Conforms to the latest ISO/ANSI C++ standard! Fast! Portable!
Runs on any platform with a working C++ compiler! Compiles to
extremely fast object code! Add your own extensions!"

Now, uh...other than being a bit light on the code generation side,
my compiler accepts any well-formed C++ translation unit, which
makes it a conforming implementation, right? It even accepts
"void main()"!!! As a convenient side effect, it also accepts every
well-formed Java program, every well formed Haskell program,
every well formed PL/1 program...it's a very flexible compiler.
Mr. Sage and Mr. Mulder...I'm willing to give you a bargain on
this little gem. Since you are the namesakes for the compiler I'm
willing to sell you a license for the low, low, low price of only
$9,999.99! Buy today! What other compiler on the market is
so language- and platform-independent?

Stop other people's arguments dead in their tracks with this hot
new C++ compiler that implements all the latest features
programmers have been asking for, including the infamous "void
main()"! Don't be hampered by the pedantry of those "other"
compilers...unleash the full power of C++, especially the use
of void return types! How can you possibly take advantage of
all the latest libraries, techniques, and idioms when you are
forced to return an int from main()?? When your friends see
the outstanding conformance of this compiler, they will beg you
for a copy! They might even steal yours! Buy today!!!

Dave
 
W

WW

Randall said:
Ah.
People from the comp.lang.c++ newsgroup are catching on to TS'
debating style. This is his MO, straight down the line.

:) I know all too well this style. I originally come from a place where
it is way too common. The only reason I post(ed) here is to "practice" to
keep my calm while faced with such an obviously destructive mind.
I would also point out that we haven't heard about that missing
semicolon for quite some time.

Certainly. I kept reminding him/her of that few times. She/he kept
snipping out that part just as carefuly/ :)
This is a clear indication that TS has realized that he is
completely wrong and cannot provide any support whatsoever
for his claim that the C++ language accepts "}" in place of ";".

Not that he cares. Her/his business is to see and enjoy grown-up people
to jump and be upset as and when she/he whishes them to. I have tried to
keep up the appearance of that so the I can keep up her/his interest in me
as a poster. And now I am waiting fpr his/her to post which tells us what
Chapter 28 of the standard says about the main function.
So he find something else to argue about
and let that debate slip into obscurity.

Tries so. But I need to correct the wording. This is no argument or
debate. He/she seeks for something else. This is a pissing contest. The
only reason for him/her to post is to enjoy seeing other people being
frustrated or otherwise feel bad. Him/her is not interested a least bit
about being right or winning the argument. All she/he does or seeks for it
is to keep it alive.
Soon, the whole issue of "void main" we be sufficiently obfuscated
that he'll be able to let that one drop as well.

No, he won't. The reason for this is because the wording of the standard is
complicated and she/he can keep up agruing this till the end of time. It is
a perfect opportunity for him/her, since most of the trolls here will be
with him/her... but as I see our favoriute trolls disappeared for now. At
least I have cleaned up my killfile and I don't see the old ones. I see
some new ones like him/her and another one who thinks that teaching is a
sin, and you must not tell if people use a term with C++ which is not a term
for C++.
"Facts" stated by TS:

1. cout is a reserved word in the C++ language

Reserved for morons? ;-)
2. cout << "hello world" (or thereabouts) involves
no function calls to "hidden code".

Sure, this is true. The code it calls (being template code) is not hidden,
it is there in the headers. :)
3. "}" can be used in place of ";"
at the end of a statement.

In a written only dialect of South-Mumbanga it has to be. :)
4. #include <iostream.h> is standard C++

Sure it is. It includes an implenetation defined system header for special
purposes. It stands for Idiot Oaf Sage TRoll's Endless Argument Mania. :)
5. void main is valid C++

It is! You just took it out of context:

std::cout <<
"Only silly people think"
"void main is valid C++" <<
std::endl;

6. You don't have to use namespaces to use
the "cout" reserved word in standard C++.

Sure not. It is reserved for morons. And in all, even in very simple,
cultures mentally challenged people are allowed to do whatever they want.
But people who are not morons can use the name as they whish, since it is
only reserved for morons, for them it is not a reserved word. So that is
one reason why the standard is allowed to use this word. ;-)
7. Extra whitespace makes a difference to standard C++ (i.e., if you
insert an extra newline between "hello world" and the "}", then this
is not syntactically valid, requiring a semicolon, but if you leave
that extra newline out, the result is syntactically valid).

Teas, I was also once convinced about that. It is true that at that time I
was hopelessly narcotized, I had 41.02Celsius temperature and my brain was
swicthed off by the doctors who were performing the surgery...
Obviously, TS' arguments are so ridiculous
that it's not even funny.

Yes. That is my main point against him/her. She/he is not entertaining
anymore, but plain boring. The first few posts were entertaining a bit,
showing up some tricks... but it became all plain and boring and -
honestly - pathetic. It is like a desevedly forgotten broken record being
played in a dump. Snip every argument, tell you are right and the other is
wrong, finish with a personal insult or combine it into the previous or the
next, list 3 companies who knowingly disagree with you (one of them publicly
stated it here) adnif possible finish with a "trigger sentence" (flame bait)
so that the one reading will jump.

Topmind (cross yourself while reading this and don't forget the garlic
either!) is one of the worst trolls ever (with his effect on comp.objects)
but he at least works his S off to come up with newer and newer ridiculous
claims and their "proof", not only repeats (but also does that) old
misconceptions proven wrong. (And he is "close" to me, since I was once an
xBase designer for many years. Although I was a good one and used OO even
there. :) )
Then again, they are so, so ridiculous, that the
fact that they are not even funny *makes* them funny.

They are funny first. And may be second time. But then they are plain
boring. They are so boring, they are not even annoying anymore.
Anyone who offers the least bit of support to *anything*
TS has to say puts their reputation in great peril :)

I certainly oppose that notion. As we do not judge people on the color of
their skin or their religious beliefs so we should not judge anyone who
seems to be agreement with his/her one or more points. There are many
reasons for this, I will list just a few:

the person might
1) ...be joking

2) ...be a newbie and can be convinced

3) ...have a point

Number 3 is the most dangerous and real trolls (like Topmind - cross,
garlic!) use this. They do plant genuine claims/arguments into their
trash-talk. When some attacks them for the trash part and another points
out that not *all* is trash they are right were they want to be: they have
got the turbulence and those (already upset due to him) people fighting over
something they could have agreed upon on a normal day in 15 seconds. So do
not attack someone just because that person *seems* to agree with the troll.
Ask what does he mean and on what does he base his claim. Usually it is
only a misunderstanding. OTOH if you see someone teaming up with the
troll... now that person has ensured that no self-respecting company will
ever employ him - not even as a contractor.
 
N

Noah Roberts

David said:
Agreed with Sage, except for the insults, C++ is what your C++
compiler eats.
[...]


So if I write a compiler that accepts every well-formed Java program,
and I call it a C++ compiler, and say that it's conforming, then I am
allowed to say that C++ is also a superset of Java? That's nonsense.

For that matter, my C++ compiler will eat this:

int main(void)
{

pid_t pid = fork();
switch (pid)
{
case -1: perror("You suck!"); break;
case 0: cerr << "Waaaaaa!!!!\n"; break;
default: cerr << "I am a parent!\n"; kill(pid, 9); cerr << "Now
I am not.\n"; break;
}

return false;
}

I guess fork() is C++.

And yes, my compiler will also eat Java :p

NR
 
W

WW

David said:
Agent Mulder said:
don't be surprized if no one ever take anything seriously that
you ever say from then on.
</>

Agreed with Sage, except for the insults, C++ is what your C++
compiler eats.
[...]

So if I write a compiler that accepts every well-formed Java program,
and I call it a C++ compiler, and say that it's conforming, then I am
allowed to say that C++ is also a superset of Java? That's nonsense.

I don't think he meant that. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,371
Latest member
Brkaa

Latest Threads

Top