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

G

Gavin Deane

The_Sage said:
Don't act like you are stupid (unless that isn't an act), but the standard does
not just say, "It shall have a return type of type int...", it says, "It shall
have a return type of type int BUT otherwise its type is
implementation-defined".

Do you know what "but otherwise" means? It means:

"what is to follow are the exceptions...".

In this case "but otherwise" can't mean that since the subjects of the
two parts of the sentence are different. The subject before "but
otherwise" is the _return type_ of main. The subject after "but
otherwise" is the _type_ (ie return type plus number, order and types
of parameters) of main.

The first part of the sentence is talking about the return type of
main. The second part of the sentence is not. So the second part can
not be describing exceptions to the rule stated in the first part.

In this case "but otherwise" means "but in all other respects". The
relevant "other respects" are the number, order and types of main's
parameters. That is a usage of "but otherwise" with which I and many
others here (including some involved in writing the standard) are very
familiar and comfortable.

As Jonathan has pointed out, you can submit a defect report if you
feel this part of the standard to be misleading or unclear. I'm afraid
I don't know how to do that but I'm sure someone here does.

GJD
 
T

The_Sage

Reply to article by: "Jonathan Mcdougall said:
Date written: Thu, 2 Oct 2003 00:08:13 -0400
MsgID:<[email protected]>
Yes, all we do is interpret things, in every domain.

Yet another word you have no clue as to it's meaning. To interpret is "to reveal
the underlying meaning of something by the application of special knowledge or
insight". There is no *UNDERLYING* meaning to the statement, "It shall have a
return type of type int BUT OTHERWISE otherwise its type is
implementation-defined", you have no special insight or knowledge regarding that
statement, and you have absolutely no insight into any alleged underlying
meaning when you can't even get the point of the overlying meaning. There is
only one blatent, clearly written, overlying statement. No interpretation is
required or needed.
What does that mean ?

It means the the statement has no ambigious or uncertain meaning.
The standard has been written by people like you and me. What is red for me could
be blue for you;

You are resorting to yet another major logical fallacy. If what is red to you is
blue for me, then you are implying there can be no such thing as red or blue,
only interpretations of what is red or blue. If you truly see red where I see
blue, and I truly see blue where you see red, then we are both right. It is red
and it is blue...your choice. Both interpretations are correct because that is
what they both really see it. Sorry ol' deluded chap, but the real world doesn't
work that way, hence the existence of science and logic. Red and blue are very
specifically defined and a few logically and scientifically determined
measurements would unambigiously demonstrate whether you were misperceiving blue
for red or not.
what I understand can be understood completly differently by you.

Only if you choose to.
No I am not on the committee, but it has been said enough times by enough people
to prove you that the intent of that phrase was to allow main() to take
implementation-defined arguments, but to restricts its return type to an int.

The people you consider worth blindly believing aren't the kind of people I find
that have a credible say in the matter. Facts and logic are not a democracy. You
can follow whatever crowd you want but I don't subscribe to mob mentality like
that.
That was the intent.

Bullshit. Unless you can prove you can read the minds of those who wrote the
Standard, which I unambigiously know you cannot, you cannot prove you know what
the intent was. All you have is the clearly unambigious statement that has no
underlying meaning.
Nobody can prove it more than that, even people who actually
_wrote_ that sentence told you.

No they didn't. I read the Standard and there ain't no one yet who works for
that Standard that has come forward to prove that is what was meant.
Which leads me to : If you think it can be interpreted that way, send a dr to
the commitee, since it was not the expected interpretation.

No need to since IT WAS the expected interpretation. Is this one of those make
believe red/blue things you were alluding to? Maybe we are BOTH right, since,
according to your "logic", there is no truth, no fact, just
interpretation...Hehehe!
What do you mean ?

If you can't understand simple English, you don't have any place in this
discussion. You already made two major blunders in your logic in your only two
posts on the topic, don't make things worse by pleading ignorance.
No, it would only break too much existing code.

No it wouldn't. Do you always make up "facts" as you go along? Just do a search
on the internet for void main(). Lots of people use it.
I don`t quite get your point here.

Yes, you have a habit of not being able to do that very often.
Now, please, I think we are having quite a serious an interesting discussion.
Try to answer to my questions and opinions in a decent way, not snipping
everything.

Why don't you try to get the point for once by using a dictionary, learning some
elementary logic, and getting an education in English above a 5th grade level?

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, 2 Oct 2003 10:11:38 +0300
MsgID:<[email protected]>

I see you still have yet to say anthing intelligent again, so I am going to
ignore your drivel again.

What is your problem, Attila the Scum? All I ever asked of you was to explain,
using a dictioanry, what the following sentence obviously means to the rest of
us who know English above a 4th grade level...

"It shall have a return type of type int BUT OTHERWISE otherwise its type is
implementation-defined"

Can you do that or are you going to fail again?

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
=============================================================
 
J

Jonathan Mcdougall

"It shall have a return type of type int..."
Yet another word you have no clue as to it's meaning. To interpret is "to reveal
the underlying meaning of something by the application of special knowledge or
insight". There is no *UNDERLYING* meaning to the statement, "It shall have a
return type of type int BUT OTHERWISE otherwise its type is
implementation-defined", you have no special insight or knowledge regarding that
statement, and you have absolutely no insight into any alleged underlying
meaning when you can't even get the point of the overlying meaning. There is
only one blatent, clearly written, overlying statement. No interpretation is
required or needed.

If I understand correctly, everybody here is misinterpreting that sentence
except you, since you definitly think you are right. When one person alone
agrees with something (whatever it is), he can start asking hisself some
questions.

Yes, one needs special knowledge to understand that sentence, a knowledge of
C++. In C++ the type of a function is made of two things : the return type
and its arguments. I fear you did not know that, hence your wrong
interpretation.
It means the the statement has no ambigious or uncertain meaning.

I agree, it is quite simple to understand, well that is what we all
thought before you came in.
You are resorting to yet another major logical fallacy. If what is red to you is
blue for me, then you are implying there can be no such thing as red or blue,
only interpretations of what is red or blue.

That is exactly what I meant. All we do is interpret.
If you truly see red where I see
blue, and I truly see blue where you see red, then we are both right.

Colors were not a good example, since it is impossible for someone to see
what somebody else sees. So nobody can say anything if you say "this is
red", since there is no reference, no truth. "Red" is only a name which
we gave to a color and that color can be seen differently by different
people. Think about daltonism.

But, yes we are both right in our interpretation if there is no reference.

But our interpretation have a reference which is the actual intent of the
writers. We can then compare my interpretation with the true intent and
your interpretation with the true intent.

The problem is : we do not have the same reference. You think the true
intent
of the writers was to allow 'void main()' while I think it was not.

Knowing this, there is _no_ way we can find a solution, apart from asking
the
writers about their intent. And some of these writers actually answered :

<quote author="Herb Sutter" job="Convener, ISO WG21 (C++ standards
committee)">

. Right, such a program [which has the void main declaration/definition]
is not a standard C++ program. It makes use of a common but still
nonstandard C++ extension.

</quote>

<quote author="Andrew Koenig"
job="Project Editor of the ISO/ANSI standards committee for C++." >

. If you write "void main() { }", then main does not have return
type int. Therefore, a conforming implementation is not permitted
to accept it.

</quote>

So the intent is : "main() must return int but the rest of its type is
implementation-defined, except for the two accepted forms". Do we agree
on that? If not, this discussion is useless. If yes, let's continue.

Your interpretation is : "main() can return void [or something else?] and
the rest of its type is implementation-defined"

My interpretation is : "main() must return int but the rest of its type is
implementation-defined, except for the two accepted forms".

By comparing interpretations, we have no choice but to reach the conclusion
that you are wrong.
It is red
and it is blue...your choice. Both interpretations are correct because that is
what they both really see it.

As I said, colors were a bad example, since we have no way to know what you
see
and what I see.
Only if you choose to.

Right, that is interpretation, choosing to understand something based on
our knowledge.
int.

The people you consider worth blindly believing aren't the kind of people I find
that have a credible say in the matter.

And why is that?
Facts and logic are not a democracy. You
can follow whatever crowd you want but I don't subscribe to mob mentality like
that.

What do you mean by that?
Bullshit. Unless you can prove you can read the minds of those who wrote the
Standard, which I unambigiously know you cannot, you cannot prove you know what
the intent was. All you have is the clearly unambigious statement that has no
underlying meaning.

No, I cannot read the minds of people. If I could, I would be very
interested
to know what _you_ are thinking right now. Perhaps you are convinced that
your
interpretation is right, or you are only wasting the time of the people on
this
newgroup. Perhaps are you frustrated since nobody seems to understand your
point,
or you don't give a damn about people.

That I would like to know waaay much more than the return type of main()
to be honnest.
No they didn't. I read the Standard and there ain't no one yet who works for
that Standard that has come forward to prove that is what was meant.

You misread.
No need to since IT WAS the expected interpretation.

How can you know that more than me?
Is this one of those make
believe red/blue things you were alluding to? Maybe we are BOTH right, since,
according to your "logic", there is no truth, no fact, just
interpretation...Hehehe!

As I said, interpretation with no reference is always true. When you
compare
the interpretation with the truth, you can then know if you are right or
not.
In some cases, it is impossible. We can only interpret, guess about
something.
In our case, it is possible to know the truth, and that truth has been told.
If you can't understand simple English,

I do, but I do not understand your point.
you don't have any place in this
discussion. You already made two major blunders in your logic in your only two
posts on the topic, don't make things worse by pleading ignorance.

Please, next time, wait for explications before rejecting the sayings of
somebody.
general

No it wouldn't. Do you always make up "facts" as you go along? Just do a search
on the internet for void main(). Lots of people use it.

I think you did not understand my point. Making 'void main()' completly
illegal
on a compiler is not pratictal since there is a lot of people using it.
You may even see that as a marketing thing. But I don't think it has
anything to
do with "C/C++ 'theorists' or 'purists' who worship standards in general".
That,
by the way, was an empty statement.
Yes, you have a habit of not being able to do that very often.

Only with people who cannot explain their point precisely. I think it is
better
to ask for precision instead of answering a question I did not understand
correctly.
Why don't you try to get the point for once by using a dictionary, learning some
elementary logic, and getting an education in English above a 5th grade
level?

Please, try to stay polite. You are right saying English is not my primary
language, but I am doing my very best.


Jonathan
 
R

Randall Hyde

Attila Feher said:
The Sage,

You have been given a chance. You have avoided to confront it.

This isn't the first time. He once challenged me to address 19 points he made
about HLL vs assembly. I said fine, here are the debating rules. He punted.
Seems he has a habit of doing this. What do you want to bet he posts a reply
explaining how he is ignoring you (sorta like the reply he made when I last
accepted his challenge?).
Cheers,
Enjoy having your life back,
Randy Hyde
 
R

Randall Hyde

The_Sage said:
I see you still have yet to say anthing intelligent again, so I am going to
ignore your drivel again.

Ha!
What did I say he would say?
Cheers,
Randy Hyde
 
A

Attila Feher

The_Sage said:
I see you still have yet to say anthing intelligent again, so I am
going to ignore your drivel again.

What is your problem, Attila the Scum? All I ever asked of you was to

This is the point when I am going to contact your service provider (via my
attorney). See you in court.
 
D

David B. Held

Randall Hyde said:
[...]
This isn't the first time. He once challenged me to address 19 points
he made about HLL vs assembly. I said fine, here are the debating
rules. He punted. Seems he has a habit of doing this. What do you
want to bet he posts a reply explaining how he is ignoring you (sorta
like the reply he made when I last accepted his challenge?).

I think it's more fun to talk about Sagebrush like he's not here,
because then his replies make it obvious that he is intruding on
someone else's conversation. Anyway, I think it's funny how he
went on and on about this compiler and that one proving his
point, and never once explained why the output of those compilers
blatantly contradicted him. Then he didn't have a peep to say
when the vendors themselves had statements admitting less than
100% conformance. Instead of pandering to his childish argument,
we should just regale each other with stories of his legendary
incompetence and weasel-like evasion of verifiable facts. At
least, I find that more amusing.

Dave
 
G

Greg Comeau

It isn't an interpretation, it is a literal translation.

Whatever you call it, it's your interpretation.
Unless you can prove
that what they didn't mean what they said or didn't say what they meant, all we
have is your word, not the Standard's word.

I am on the C++ committee and when I voted the standaard in,
that's what I meant to say. Others on the committee have posted
here to say it's what they wanted it to say too.
But you know what? I don't care what was intended or what was meant, as long as
the manufacturer offers me what I want or need. Standards can be good things or
they can be bad things -- especially when the Standard becomes stagnant,
dictatorial, and unresponsive to *all* of it's end users.

As we've shown, the manufacturers you refer to only offer what
you speak of in non-standard mode, so talking about this as
if it were standard does not follow.
Making void main() illegal would not be a diplomatic thing to do. It would only
appeal to the C/C++ "theorists" or "purists" who worship standards in general so
much that they would want it to become the unyielding Word of God, but I was
raised in a freethinking environment, unencumbered by unwavering fanatical
adherence to just one idea. It called "evolution".

Then so be it.
 
B

Beth

WW said:
Yes. Be proud Beth shares your opinion.

Actually, strictly, I did not say that I shared David's
opinion...merely that I had not previously contemplated any issues of
age before making my remarks, which David reminded me of giving
consideration to, in what he said...

But, on further reading of the conversation between you two - such as
the above quoted exchange - I can't see that either of you has a
monopoly on this...

Translation:

David: "Beth agrees with me! Beth agrees with me! Nah-na-na-nah-nah!"
Attila: "Waa! I don't care! Beth's stupid! So you're stupid too!" [
*sulk* ]

Excellent; I'm sure you could make a comedy sketch out of this or
something...like two important businessmen discussing important
financial markets in all the serious lingo and then, suddenly and
unexpectedly, they start disagreeing and start poking each
other..."Nah-na-na-nah-nah! The boss likes my report better than your
report!" / "No fair! No fair!" *snatches report* / "Hey! Give it back!
Give it back! Boss! He's taken my report and won't give it back! Make
him give it back, please!" / *holds report out of reach and switches
hands whenever the other one's about to get it* and so on and so forth
;)...

Hey, we're all big kids, really...me too...at least it means you
aren't "booooring!" or anything ;)

Beth :)
 
B

Beth

WW said:
There is 0, nul, nil, nada, zip arrogance in my post you have quoted. Of
course if you ask for arrogance long enough you can get it.

No, I've made my point...you don't agree with it, apparently...fine,
agree to disagree...

Auf wiedersehen,
Beth :)

P.S. I was right, though...and you _know_ it...but I can understand
you don't want that dragged out in public...fine, your wish is
granted...I'm gone...
 
B

Beth

The_Sage said:
it says, "It shall have a return type of type int BUT otherwise its type is
implementation-defined".

Sage, dear...the "type" after "but otherwise" is referring to the
overall data type of the routine (which _includes_ also its parameters
in C++, remember...overloading and so forth)...which is NOT the same
"type" as its "return type"...in C++, the "return type" is merely one
facet of the functions' overall "(data) type", which includes the
parameter declaration too...

typedef int (*main_type)(int, char *[]);

NOT:

typedef int main_type;

....as that's not even a function...and C++ _is_ fussier than C, the
parameters _must match_ also for something to be "the same
type"..."typedef int (*main_type)();" isn't good enough in C++...

[ That's correct, right, C++ people? Hey, I'm an ASM coder...I only
claim knowledge sufficient to get the odd thing to actually run
sometimes to supplement ASM snippets ;) ]

Beth :)

P.S. Sage, I _will_ ignore your reply...I'm just bored at the moment
with nothing much to do, so, heck, why not? I'll have fun poking a
large stick into the Sage a few times ;)
 
B

Beth

Jonathan said:
The standard has been written by people like you and me.

I would suggest simply finding the person who wrote the sentence and
getting them to confirm it...but there's no point, Sage would just
argue that s/he doesn't understand English...and then if you get
English scholars to confirm s/he is understanding English
correctly...then those scholars are wrong...somehow...then he'll
change the subject and do it all over again...and again...

The Sage has his own simple law: "I am always right"...nothing can
ever sufficiently get through to him to think anything even marginally
different...it's that simple...you just really have to let it
go...reply just to have some amusement when you're bored or
something...but there's no point in serious discussion because the
Sage will _never_ return in kind...

That, of course, makes him highly, highly frustrating...but that's
what makes him such an exceptionally good troll...

In the immortally wise words of the Human Torch:
Flame on!

Beth :)
 
W

WW

Beth said:
Translation:

David: "Beth agrees with me! Beth agrees with me! Nah-na-na-nah-nah!"
Attila: "Waa! I don't care! Beth's stupid! So you're stupid too!" [
*sulk* ]

Stay with assembler. You won't make a good mind reader. :)
Excellent; I'm sure you could make a comedy sketch out of this or
something...

I like the something part. It leaves room for creativity. ;-)
 
K

karen

David B. Held said:
I think it's more fun to talk about Sagebrush like he's not here,
because then his replies make it obvious that he is intruding on
someone else's conversation. Anyway, I think it's funny how he
went on and on about this compiler and that one proving his
point, and never once explained why the output of those compilers
blatantly contradicted him. Then he didn't have a peep to say
when the vendors themselves had statements admitting less than
100% conformance. Instead of pandering to his childish argument,
we should just regale each other with stories of his legendary
incompetence and weasel-like evasion of verifiable facts. At
least, I find that more amusing.

Dave



---
And didja read FoxTrot this morning? Even a cartoonist knows not to use
void main!

I'm in an VC++ only shop, so I'm not really up on standard C++. It didn't
look quite right (I think) according to what I'm learning here, but then, it
was just a cartoon.

-karen
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top