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

B

Beth

Attila said:
"noise")...he's

Beth. There is a very good tactic against such trolls like The Sage or that
whateverMind from comp.objects. Just put all threads they start or
conteminate to be ignored. I suggest this because you seem to be very
concerned and passionate about his behaviour... but posting long analysis of
his personality is only good to keep his thread alive. Thanks God he is not
posting now for a while. Let's let this thread die of starvation.

Well, I was actually expecting him to continue for a little bit
longer, truth be told...and, thus, the purpose of these posts was to
expose the troll immediately and encourage others to realise what he
is and ignore him straight away...to snuff the fire out before it
could even take hold...because, in a sense, the problem isn't Sage's
posts - if you see his name then you can just skip over that post -
but the fact that he tends to generate lots of replies from people you
_don't_ want to kill-file or ignore...and killing off an entire thread
because the Sage enters it isn't always possible either...other
"branches" of the thread may be good and useful...in fact, as the Sage
has a particular dislike for me naming him for what he is, if he knew
I was automatically ignoring all threads he was involved with, he'd
post up things just to "taint" every single thread so there's nothing
left for me to read...

Anyway, I'm one of those people who insists on "principle" and,
unfortunately, Freedom of Speech - regardless of how stupid or
offensive it is - and lack of censorship on the internet are things I
subscribe to whole-heartedly...so, I don't kill-file or report people
to "authorities" on those principles...posting warnings about the Sage
is, therefore, my "Freedom of Speech" way to deal with this sort of
thing...we share a common concern and I respect your decisions but,
well, we do things different ways...

But, you're right...if the Sage has stopped his nonsense this time and
everyone's now got the message plain and clear that he's just a troll
to be ignored whenever they might see his name again then my work is
done here...I'll cease from bothering everyone now...have a good time
C++-ing, until we may meet again, bon voyage...

Beth :)

P.S. Also pardon the length of my posts...I'm reknown for my
over-verbosity in the ASM groups...I've actually tried to be
restrained for you C++-ers who are not used to my little insanities :)
 
A

Attila Feher

Beth said:
I suspect the Sage would only come back using another NSP
too...although, I'd also stress that suddenly disappearing mid-thread

Please stop bringing this thread up.
 
A

Attila Feher

Beth said:
Well, I was actually expecting him to continue for a little bit
longer, truth be told...and, thus, the purpose of these posts was to

Please stop bringing this thread up. Thank you.
 
K

Karl Heinz Buchegger

Beth said:
I think now our C++ newsgroup friends can start to appreciate what I
mean about Sage's trolling tactics...he's clearly a complete moronic
baffoon when it comes to facts and even being able to read simple
English statements correctly...and, yet, he somehow just keeps on
getting people to respond to him in massive threads which take over
entire newsgroups for weeks...

Don't get me wrong.
It seems to work fine in your case :)
 
F

Frank Schmitt

Beth said:
Ah, the dreaded "backwards compatibility" forever haunting you with
design mistakes from the 1950s (okay, 1970s in C's case :)...the
"undead" zombie that refuses to lie still in its grave and finally
perish, like something out of Buffy the Vampire Slayer...

Oh, in which case, ignore the other post I made about making it an
error...let me guess: It can't be done because original K&R C syntax
allowed it and, thus, forever more, it must be allowed...

No, sadly the standard committee don't even have *that* excuse - implicit
'return 0;' at the end of main was introduced with the 98 C++ standard,
AFAIK.
IMHO, the C++ standard committee did a good job overall, but this
extension is just braindead.

kind regards
frank
 
T

T.M. Sommers

Beth said:
Hmmm, maybe it's because we're all assembly language posters over here
who hate "automatic" anything and insist on everything being
_explicitly_ defined...but, well, that seems a dodgy thing to add to
either language...adding special exceptional behaviours...

Surely, if there's lots of C / C++ coders who are not putting in the
"return 0;" then it would be better to consider that an _error_ - to
force them to learn to do it properly - rather than adding this
implied behaviour to "main" as some exceptional behaviour...that cuts
into the consistency of the language, surely, to add lots of "it's
like this but not like that but like this if this is true but not
this" rules into it...

I would suggest that, to the extent possible, the standards committees
wanted to make the language conform to practice. Of course, that
extent is not very much with a computer language, as compared to a
natural language, but in this case it is safe and feasible to imply
the return, lots of people omit the return, so why not allow it? I'm
sure you recall what Emerson said about consistency.
 
K

Karl Heinz Buchegger

T.M. Sommers said:
I would suggest that, to the extent possible, the standards committees
wanted to make the language conform to practice. Of course, that
extent is not very much with a computer language, as compared to a
natural language, but in this case it is safe and feasible to imply
the return, lots of people omit the return, so why not allow it?

Because it is a special case, everybody has to remember.
Adding a return 0; in every program would not have been
a problem, can be done in seconds and in half a year or
maybe a year after dropping that rule the whole issue would
be a non-issue, because main() behaves just like any other
function returning int.
 
T

T.M. Sommers

Karl said:
Because it is a special case, everybody has to remember.
Adding a return 0; in every program would not have been
a problem, can be done in seconds and in half a year or
maybe a year after dropping that rule the whole issue would
be a non-issue, because main() behaves just like any other
function returning int.

The only people who have to remember are the compiler writers. The
rest of us can put a return at the end of main(), and forget that it
isn't necessary.

I'm not saying that implicit return 0 is the greatest thing since
sliced bread, just that it is a defensible decision on the part of the
committee.
 
C

C

Beth said:
P.P.S. Actually, "C", perhaps it was unwise and not terribly
clever to cross-post the Sage over to other groups...we wouldn't
want to have him "spread" and "infect" other groups...he's bad
enough in ours that we can't wish him upon anyone else...

<sheepish> Errr ... sorry </sheepish>

[At least in my defence I can say I have resisted replying to many
of the posts here, as saying 'me too' to expert opinions adds
little more than noise.]

What I was expecting was a definate option of couple of people who
understood the C++ standard which could not be defensibly refuted,
plus a link to the standards document for future reference by
myself (as happened) -- I honestly expected TSag to ignore my post
and any responces to it as confronting them would prove him an
idiot or a troll -- the way he choose to do so points to the latter
though it does not discount the former entirely.

Normally, if the topic had been Assembly, ISO C, Java, VHDL or even
maybe Ada, I would have been able to supply the facts myself,
however C++ is outside my arena of expertese (and _very_ complex),
I had the suspicion that I was (generally) right in my original
criticisms, this (abet rather longer than I expected) thread
confirmed those suspicions.

So for those who responded with valid points and well informed
options, you provided me with exactly the information I desired in
a concise, effective and authorative way, thank you.

I should be able to respond to furture C++ based queries, of either
myself or others, by referencing the resources highlighted, so I
should no longer need to 'pester' comp.lang.c++ :).

[After reading the FAQ and standard, I am beginning to see the C++
automatic finialisation as a _very_ good idea for a 3GL, now I just
have to figure out how to make my compiler generate efficient
assembler code to do this. I have already figured out a way using
dual stacks (data and return), implementation of which, I think,
would be permissable by the C++ standard, now to see if it can be
done with a single stack without requiring either a frame pointer
register or large amounts of tables and/or code to allow stack
unwinds.]

C
2003/9/19

PS: I now have a plan I believe will refute any posts from TSag
without generating long and offtopic threads such as this -- if
he shows up again I will test my theory out.

PPS: Beth, I think the "logical fallacy" reponce was partually
cured with this slightly sarcastic post:
http://groups.google.com/[email protected]
(or at least it was used less frequently afterwards that reply).

PPPS: I will shutup now, as I doubt anything I could further add
to this thread would amount to anything more than a repetition of
either myself or others.
 
T

The_Sage

Reply to article by: "Attila Feher said:
Date written: Thu, 18 Sep 2003 11:35:06 +0300
MsgID:<[email protected]>
No, it does not. 3.6.1 Main function paragraph 2:
"*It shall have a return type of type int*, but otherwise its type is
/implementation-defined/. All implementations shall allow both of the
following definitions of main:
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }
"
continuing with
"The function main shall not be used (3.2) within a program. The linkage
(3.5) of main is /implementation-defined/."
For those who can read and understand (not you Rage, opps Sage) it says:
The main function must have the return type int. However you are not
allowed to call it so this int is for the implementation not you. The rest
of the function signature can be whatever the implementers define *but* it
must define the above two full signatures as valid.
Nope Sage. You have just proved that not only you are clueless and
arrogant, but it is also hopeless for you to ever change.

Wow, yet another completely illiterate idiot. Here, let me put this in simple
terms an imbecile you like could understand. From the quote you JUST GAVE...

"3.6.1 Main function paragraph 2:
It shall have a return type of type int..."

Which all ISO compilers like MS, Borland, and IBM do.

"...but otherwise..."

See that word? It means that the standard allows breathing room for other return
types other than int. Duh!

"its type is implementation-defined"

Therefore, any compiler that implements other types of main() functions other
than int main(), such as void main(), are ISO compliant. MS, Borland, and IBM
use int main() AND ALSO IMPLEMENT/DEFINE void main(), therefore they are ISO
compliant. Please get a clue before posting next time! Gawd, how stupid can you
guys get! The standard clearly state that other return types are allowed, in
addition to int!

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: "Attila Feher said:
Date written: Thu, 18 Sep 2003 11:39:02 +0300
MsgID:<[email protected]>
The proof is in my previous post.

Wrong again, since you didn't provide any quotes, you just blindly asserted it
was so. You failed to prove anything other than you have no clue what you are
talking about. Try again...but this time try to get it right, okay?

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: Mike Smith said:
Date written: Thu, 18 Sep 2003 16:56:21 -0400
MsgID:<[email protected]>
Don't be silly.

Don't try to dodge and evade the issue. Either you have the quotes or you do
not.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: (e-mail address removed) (Sam Holden)
Date written: 18 Sep 2003 01:18:13 GMT
MsgID:<[email protected]>
Do you know the meaning of the words "all" and "must"?

I certainly do but the real question is, do you know the meaning between
mandatory and optional? The ISO standard clearly states that you can optionally
implement other kinds of return types, therefore if you return other types other
than int, such as void, you are still ISO complaint. The int type is ISO
mandatory but the void is ISO optional, in other words.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: "David B. Held said:
Date written: Thu, 18 Sep 2003 00:50:04 -0500
MsgID:<[email protected]>
Obviously, you're the one that can't read.

You are all talk and no facts. The standard states that the manufacturer can
optionally specify other types other than int, therefore *any* return type the
manufacturer specifies, such as void, is ISO compliant since the ISO standard
allows it.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
N

Noah Roberts

The_Sage wrote:

The standard states that the manufacturer can
optionally specify other types other than int, therefore *any* return type the
manufacturer specifies, such as void, is ISO compliant since the ISO standard
allows it.

Even if that where true, C++ code that uses any other return type than
int for main is not standard compliant. Even if it is ok for a compiler
manufacturer to implement other versions of main those versions are
still vendor specific and any code that uses them is NOT compliant.
The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

Your website is completely broken.

NR
 
T

The_Sage

Reply to article by: "Attila Feher said:
Date written: Thu, 18 Sep 2003 11:48:33 +0300
MsgID:<[email protected]>

Obviously you are illiterate, so let me put this in terms even an illiterate
idiot like you can understand...

"3.6.1 Main function paragraph 2:
It shall have a return type of type int..."

All ISO compatible compilers like MS, Borland, and IBM conform to this.

"...but otherwise..."

See that word? It means that the standard allows breathing room for other return
types other than int. Duh!

"its type is implementation-defined"

Therefore, any compiler that implements other types of main() functions other
than int main(), such as void main(), are ISO compliant. MS, Borland, and IBM
use int main() AND ALSO IMPLEMENT/DEFINE void main(), therefore they are ISO
compliant. Please get a clue before posting next time! Gawd, how stupid can you
guys get! The standard clearly state that other return types are allowed, in
addition to int!

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: Josh Lessard said:
Date written: Thu, 18 Sep 2003 11:44:25 -0400
MsgID:<[email protected]>
I'm sorry, I just couldn't sit back and watch you make a jackass of
yourself any longer without saying anything.

You are sorry and a jackass and an idiot. As proof...
My god you're an idiot. What part of "they must all have return type
int" don't you understand??

Listen up spooge for brains, all ISO compliant compilers to return int, but the
ISO standard clearly states that you can optionally implement other kinds of
return types, therefore if you return other types other than int, such as void,
you are still ISO complaint. The int type is ISO mandatory but the void is ISO
optional, in other words.

Get a clue you freaking idiot!

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: Mike Smith said:
Date written: Thu, 18 Sep 2003 16:58:04 -0400
MsgID:<[email protected]>
Wrong! *All* versions of main() must return int.

And they all do.
It says so in plain English; you just typed it yourself!

It also says you can return other types, such as void, but obviously you can't
read plain English.
What can vary are the *parameters* to main().

I'm waiting for one of you illiterate idiots to quote any legitimate authority
that states that all those ISO compliant compilers such as MS, IBM, and Borland
put out that, in addition to returning an int for main() also allow void, are
therefore not ISO complaint as they claim they are. Your mere opinions are not
going to change that one fact.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: "David B. Held said:
Date written: Thu, 18 Sep 2003 00:53:00 -0500
MsgID:<[email protected]>
To introduce any more facts would be an insult to the
numerous people who have already provided more than
ample evidence to soundly refute your ridiculous claim.

Obviously you don't know what a fact is then. I asked you for facts and all you
can do is call people names. Are you going to bark all day little doggy, or are
you going to bite?

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
N

Noah Roberts

The_Sage said:
You are a total idiot Randall. that is NOT my example at all. The proper example
is:

#include <iostream.h>
void main() {
cout << "Hello, World!" }

The way you have typed it should return errors, but that is not the way I
specified it.


In file included from /usr/include/c++/3.3/backward/iostream.h:31,
from test.cpp:1:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the
C++ standard. Examples include substituting the <X> header for the <X.h>
header for C++ includes, or <sstream> instead of the deprecated header
<strstream.h>. To disable this warning use -Wno-deprecated.
test.cpp:2: error: `main' must return `int'
test.cpp: In function `int main(...)':
test.cpp:3: error: parse error before `}' token
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top