Exceptions in C/C++

J

James Kuyper

jacob navia wrote:
....
WORD GAMES. That is exactly their attitude.

Words matter. Using them correctly matters. Calling it "word games" or
"mere semantics" or "pedanticism" is just a symptom of sloppy thinking.
 
F

Flash Gordon

jacob navia wrote, On 09/12/07 17:39:

And always refusing any discussion of the issues at hand. Even when
Heathfield himself says that one of the things that bothers him in C
is the lack of operator overloading, he refuses to engage in any
discussion about it where the ISSUES at hand would be discussed.

Well, the issue in this thread was firstly someone wanting to know if
__try was C or C++ and when what he could do in dev-cpp, not Visual
Studio or lcc-win or anything else, but dev-cpp to catch exceptions. So
you bringing up being able to use __try in lcc-win was YOU ignoring the
issue at hand.

In your rush to switch to discussing topicality you are failing to
address why lcc-win32 having a specific extension is relevent to the OP
who wants to use a different compiler.
 
R

Richard

James Kuyper said:
jacob navia wrote:
...

Words matter. Using them correctly matters. Calling it "word games" or
"mere semantics" or "pedanticism" is just a symptom of sloppy
thinking.

Except for the fact they were misusing words for word games. It is not
sloppy thinking to describe things in a way with which the target
audience can understand within the limits of their own level.

How, for example, would you interpret Heathfield's claim that there are
no such things as global variables in C?

How would you describe a call "stack" when there is no "stack"? Keeping
in mind that it in no way alters the WAY the C program executes.

There are times for exact language. And there are times when it is an
obstruction. That kind of word play should be in the std group IMO.
 
R

Richard

jacob navia said:
"... the planet's formeots experts"

WOW

Well, after that page of self publicity I will zap
mind you?

Wow. I take it all back. He is also one of the planet's "formeots"
experts. Although what a formeot is any why we need experts on them is
another story. And why these formeot experts set the agenda in a C
newsgroup is quite beyond my understanding.
 
W

William Pursell

He believes that he can always destroy threads discussing
changes in the language, proposals about improving this
or that inconsistency, etc with his eternal "off topic"
whining.

What is on topic or not is not for Mr Heathfield to decide

I repeat: he has NO AUTHORITY here, in any case no more than
anyone else.

This is technically correct. However, I believe Mr.
Heathfield has more reader's respect than
do you, and in that sense he realistically does
have more of an impact on the group. That may
be construed as more authority.
And I repeat again:

I will go on trying to bring this changes into C, and I beleiev this
group is the correct forum, and if someone doesn't like that it can
always use a killfile.

Just throwing in a data point: I agree with you
that there are quite a few people who annoyingly
throttle good discussions in the name of topicality
in a way that I think is inappropriate. However,
I also think that you often attempt to initiate
discussions that are in fact totally off topic
and appear to be nothing more than attempts
to support what appears to be your overly inflated
ego. In point of fact, I rarely read posts
with your name on them, because I for one
have grown tired of your ranting about the
wonderful extensions in lcc-win32, most of which
seem to me to be totally pointless. Also,
I'm pretty tired of your rants against RH.
(To be fair, I also am annoyed at his counter
rants, although I find myself in agreement
with him more often than with you, so I am
more tolerant of his.) Does this make me
his "friend" (a word which you seem to be using
in a derogatory way to describe mindless
followers of some cult personality) ? No,
it just means that he tends to post technical
details that I find interesting, whereas you
don't.

To summarize: most of the time you're hurting
your own case by being an annoying twit. I truly
don't mean this as an insult, and I don't want
to offend you, but...get a clue.
 
R

Richard

William Pursell said:
This is technically correct. However, I believe Mr.

Well, there you go then. Technically correct.
Heathfield has more reader's respect than
do you, and in that sense he realistically does
have more of an impact on the group. That may
be construed as more authority.

Not in the slightest. This is a public newsgroup and Heathfield has no
more sway than the worst spammer. Yes he can choose what he wishes to
help with but to berate others for helping in issues HE construes to be
off topic is ridiculous. In many cases there are no other suitable news
groups and here is a collection of decent C programmers. If you want to
help - help. If not, then don't. Simple enough really. I am not
advocating anarchy. See later.
Just throwing in a data point: I agree with you
that there are quite a few people who annoyingly
throttle good discussions in the name of topicality
in a way that I think is inappropriate.

And *that* is the discussion at hand. Nothing more. nothing
less. Heathfield is purposely obstructive and diversive when anything
is asked outside of his own comfort zone: example? Look how he purposely
confused the thread decently concerning floating point rounding. He
blatantly used his inability or refusal to download a C90 compiler to
project Jacob's code as uncompilable and incorrect. He was seen through
by a few here and I believe made himself look like a bit of a prissy
little trouble maker. With Jacob you get what you see - practical,
fallible man eager to help and never preening or gloating over other
people's errors.

No one is asking for this group to lose the essence of standard C but
the techniques and approaches also benefit programmers in more specific
compilers and platforms occasionally. And to discuss issues with the
language amongst the C cognoscenti is, IMO, perfect for here. Keep most
in a single thread. Don't like it? Kill the thread.
 
J

jacob navia

William said:
This is technically correct.
OK.

However, I believe Mr.
Heathfield has more reader's respect than
do you, and in that sense he realistically does
have more of an impact on the group. That may
be construed as more authority.

He has surely a group of people behind him that
do not hesitate to start insulting anyone
that doesn't agree with them.
Just throwing in a data point: I agree with you
that there are quite a few people who annoyingly
throttle good discussions in the name of topicality
in a way that I think is inappropriate. However,
I also think that you often attempt to initiate
discussions that are in fact totally off topic
and appear to be nothing more than attempts
to support what appears to be your overly inflated
ego.

Example?
What discussion about what when?
In point of fact, I rarely read posts
with your name on them, because I for one
have grown tired of your ranting about the
wonderful extensions in lcc-win32, most of which
seem to me to be totally pointless.

You could participate and SAY in which technical point or why
they are "pointless". That could be more constructive isn't it?
Or say how would YOU solve the problems I raise (need for an
abstract container syntax, bounds checked arrays, introduction
of new numbers, exceptions etc etc)

And please, just "use C++" is not any argument.

Also,
I'm pretty tired of your rants against RH.
(To be fair, I also am annoyed at his counter
rants, although I find myself in agreement
with him more often than with you, so I am
more tolerant of his.) Does this make me
his "friend" (a word which you seem to be using
in a derogatory way to describe mindless
followers of some cult personality) ? No,
it just means that he tends to post technical
details that I find interesting, whereas you
don't.

If you are interested in Heathfield post that is 100% OK with me.
If you are not interested in the posts I do (for whatever reasons)
that is 100% OK with me. But please do not try to kill discussions
with "off topic off topic". Just do not participate and that would be
all!

To summarize: most of the time you're hurting
your own case by being an annoying twit. I truly
don't mean this as an insult, and I don't want
to offend you, but...get a clue.

Just go on ignoring my posts and all will go on well.
You do not need to read them at all.
 
K

Kenny McCormack

Keith Thompson said:
jacob navia said:
The subject of the group is C. Nowhere in the charter was mentioned
that it was just ISO C.
[...]

This newsgroup has no charter.

The extreme psychosis evidenced by this (often repeated statement)
speaks for itself. Obviously this group has "something" about it that
makes it have a clearly defined purpose and clearly defined (and often
enunciated) limits on what should (and can) be discussed. If that isn't
a charter (or the moral equivalent thereof, regardless of what you
choose to call it), I don't know what is.

The above is clearly self-evident to anyone with an IQ above room
temperature (Yes, I know that exclused things like RH and KT). What is
more interesting is the question raised below.

Honest question here (and one I truly hope KT has the courage and
decency to answer): Why is this so important to you? Why do you insist
on denying (against all logic) the existence of a charter (said term
interpreted as described above) for clc? Why do you make such a big
deal of it?
The how come you and Heathfield seem to know so much about what can and
can not be posted? comp.lang.c. computers-language-c.

Some flexibility does no harm. It's why God gave us a brain and
newsreaders with "kill thread" functionality.

You would think...

However:
As indicated above, it is not clear that God did give things like RH &
KT brains. Whether or not they have "kill thread" (aka, "killfile")
capabilities cannot as yet be determined.
 
R

Richard Heathfield

James Kuyper said:
jacob navia wrote:
...

No, the only correct thing to say is that is has no charter, only an
informal statement of purpose.


Agreed.

Likewise. Nor have I ever claimed otherwise. It's a strawman.
 
R

Richard Heathfield

James Kuyper said:
jacob navia wrote:
...

Words matter. Using them correctly matters. Calling it "word games" or
"mere semantics" or "pedanticism" is just a symptom of sloppy thinking.

Right. It should be "pedantry".

:)
 
K

Kenny McCormack

A Charter is not an email. It has a very specific meaning in usenet.

Granted. But this is simply not a distinction that anyone with an IQ
above room temperature gives a hoot about.

Thus:
1) The psychosis of those who continue to insist that there is a
difference (that matters to anyone other than other psychotics) would
make a great case study for a Psychology PHD.
2) Jacob *would* probably do well to stop using that (that old email) as
his case, since the psychotics that he is trying to convince (his
intended audience) have alreay shown themselves immune to it.
 
K

Kenny McCormack

It IS the originating charter. If you don't get locked up in word games.

Indeed. As I've said else-thread, the real question is why these
nut-jobs think the distinction matters.
 
K

Kenny McCormack

jacob navia said:
The subject of the group is C. Nowhere in the charter was mentioned
that it was just ISO C.
[...]

This newsgroup has no charter.

I know you've been told that a number of times. Apparently you just
haven't been told *enough* times. Let me know how many times you need
to be told that this newsgroup has no charter before you believe it,
and I'll be glad to send you an e-mail message that repeats the
statement "comp.lang.c has no charter" that many itmes.

What a loon!
 
C

CBFalconer

jacob said:
William Pursell wrote:
.... snip ...


He has surely a group of people behind him that do not hesitate
to start insulting anyone that doesn't agree with them.

Just for sport, maybe all readers who consider themselves capable
of distinguishing Richard Heathfield in an army of male humans,
would answer with a 'Distinguish' sentence. Those who are
incapable of so-doing should answer 'Undistinguished'.

This might tend to deny (or confirm) Jacobs conclusions.

Undistinguished.
 
K

Keith Thompson

jacob navia said:
Richard Heathfield wrote: [snip]
I do not care about your opinion, neither the opinion of
your friends. And I do not give a dam either about your
insults campaign, done with anonymous posts.
[...]

What anonymous posts are you referring to? What evidence do you have
that Richard Heathfield has ever posted here anonymously?

Making baseless accusations does not make you look good.
 
W

William Pursell

He has surely a group of people behind him that
do not hesitate to start insulting anyone
that doesn't agree with them.

There is a lot of rampant and pointless name-calling
on this group. And I apologize both to you and
the group for adding to that with my
post yesterday. Although I truly did not mean
it as an insult when I called you a an "annoying
twit", I can see that there is no other possible
way to interpret that. I typed in haste, and
apologize for saying that.
Example?
What discussion about what when?


I don't have examples. I was merely conveying my
overall impression of you as a poster.
You could participate and SAY in which technical point or why
they are "pointless". That could be more constructive isn't it?
Or say how would YOU solve the problems I raise (need for an
abstract container syntax, bounds checked arrays, introduction
of new numbers, exceptions etc etc)

The key here is "need". I disagree that C needs these
things. That is really the fundamental argument that
I often see you failing to make. Whether it is
Heathfeild's or someone else's fault, discussions
seem to boil down to:

JN: This is the solution to bounds checked arrays.
Other: C doesn't need bounds checked arrays.
JN: Are you an idiot?! Of course it does, and here's
how it is solved in lcc-win32, the greatest compiler
ever written, by the greatest compiler in the history
of computing, and you're an idiot!

I do not pretend that that exact dialogue has ever
occurred, and am merely presenting my impression
of your posts over the past year.
And please, just "use C++" is not any argument.

Believe me, I am the last person who will ever
recommend C++.
 
J

jacob navia

William said:
The key here is "need". I disagree that C needs these
things. That is really the fundamental argument that
I often see you failing to make.

I am saying that it should be possible to program in C using
a normal software engineering environment, i.e. an environment
where things like exceptions are there, an environment where
you can do things like containers and bound checked
arrays if you wish.

All those things are applications of a *single* enhancement:
operator overloading.

There is a misunderstanding if you think I want to add all those things
to the language. That is surely NOT the case. Those things can be done
if we add operator overloading, but they need not be in all
implementations, and I have always said that this enhancements are
optional in the sense that you do not need to use them, you can still
program as before with these enhancements there.

Another things is the subject of this thread, i.e. exceptions.

Exceptions are needed in C specially in embedded systems
where a reasonable handling of errors and traps is REQUIRED!

The argumentation of many people here (not Heathfield since
I do not recall any argument from that person, just "off topic", etc)
is that error handling should be done manually, i.e. it is up to the
programmer to catch all possible exceptions and be held responsible for
all routines he calls. If any of those traps, the application
fails and that is all.

This is just not acceptable in many environments.

Please let's argument within the technical context
 
B

Bart van Ingen Schenau

I am saying that it should be possible to program in C using
a normal software engineering environment

In my opinion, that is already possible, with the C language as it is
currently defined.
, i.e. an environment
where things like exceptions are there, an environment where
you can do things like containers and bound checked
arrays if you wish.

I don't see those as a necessary part of a 'normal software
engineering environment'.
Some of them might be useful in some circumstances, but I can live
without them if I must.

Another things is the subject of this thread, i.e. exceptions.

Exceptions are needed in C specially in embedded systems
where a reasonable handling of errors and traps is REQUIRED!

Can you explain then why there are so few compilers for embedded
targets that provide an exception-handling extension? I have never
encountered or heard of one, while I work in that segment of
engineering.
And those compilers typically have plenty of extensions.
The argumentation of many people here (not Heathfield since
I do not recall any argument from that person, just "off topic", etc)
is that error handling should be done manually, i.e. it is up to the
programmer to catch all possible exceptions and be held responsible for
all routines he calls. If any of those traps, the application
fails and that is all.

This is just not acceptable in many environments.

And how does exception handling here?
To me, exception handling is a mechanism to do "long-range" error
*reporting*.
The advantage is that intermediate code does not have to be aware of
which error occured, at most it must know to do cleanup.
Exception handling does not help in any way in detecting problems (you
still have to test various contidions and throw an exception if
needed) or in handling the problems.
Exception handling does not magically stop the application from
crashing if you perform an illegal operation.

Bart v Ingen Schenau
 
J

jacob navia

Bart said:
In my opinion, that is already possible, with the C language as it is
currently defined.


I don't see those as a necessary part of a 'normal software
engineering environment'.
Some of them might be useful in some circumstances, but I can live
without them if I must.

If you must, you can program in assembler.

If I must I can do without a debugger, using edlin for editing,
etc.

But why must you?

This is the point!

All of them are useful, and once you have them it is obvious that they
give you more development possibilities:

o fixed point numbers
o bound checked arrays
o container access to abstract data types.

They allow you to do things that in most environments
are considered normal. Why must C remain at this
level? There is NO REASON.
Can you explain then why there are so few compilers for embedded
targets that provide an exception-handling extension? I have never
encountered or heard of one, while I work in that segment of
engineering.
And those compilers typically have plenty of extensions.

1) Some Real Time OSes provide facilities of their own.
2) The first requirement when I ported lcc-win to an
embedded system was try/catch.
3) Extensions do exist. Look at
http://www.on-time.com/ddj0011.htm
for an example
4) There are hundreds of different packages providing try/catch
using different syntax mist of them based in setjmp/longjmp
or assembly. This points to a HOLE in the language.

5) Microsoft provides this facilities. You may have heard of
this small company.
6) Some research papers like
Abnormal Events Handling for Dependable Embedded Systems

http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=&arnumber=4020866&isnumber=4020846
where (another) extension for C is proposed.
7) Ideals symposium for embedded software. One research paper:
http://www.embeddedsystems.nl/site/frames.html?/site/projects/ideals/symposia.asp
Discovering faults in exception handling as an example of recurring
code; Magiel Bruntink (CWI)
Exception handling is a key component of any reliable software system.
This allows the system to detect errors, and react to them
correspondingly. Despite its importance exception handling is often
the least well understood, documented and tested part of the system.
An approach and analysis tool will be presented to reduce the number
of implementation faults related to exception handling.

And I could go on and on. Google reports 1 840 000 hits.

If you have never even heard about a compiler like that this is because
progress in embedded software is SLOW, and in C is even slower!
This doesn't mean that reasearch people do not see this as a problem, or
that people aren't trying to fix this problem. It means that there is
a big penalty for not having a lightweight try/catch IN THE LANGUAGE.
And how does exception handling here?
To me, exception handling is a mechanism to do "long-range" error
*reporting*.


No. It allows you to establish nested RECOVERY POINTS in your
software, where errors can be handled and then, the program is
allowed to continue!
The advantage is that intermediate code does not have to be aware of
which error occured, at most it must know to do cleanup.
Yes.

Exception handling does not help in any way in detecting problems (you
still have to test various contidions and throw an exception if
needed) or in handling the problems.

Nobody said that exception handling will handle
the errors. This is a strawman argument, excuse me. It helps
in programming for handling errors but it doesn't SOLVE the
problems OF COURSE!
Exception handling does not magically stop the application from
crashing if you perform an illegal operation.

The Microsoft exception handling yes, it stops that.
 
A

Antoninus Twink

jacob navia wrote:
...

No, the only correct thing to say is that is has no charter, only an
informal statement of purpose.

Interesting that the "regulars" always try to rubbish this statement of
purpose. A cynic might guess that they'd place a somewhat higher value
on the group's founding document if it didn't completely undermine their
own narrow view of topicality.

In theory, Heathfield may have no authority in the group. But in
practise he is such a strong personality that he is able to impose his
will by stirring up sycophantic support from his adoring fans.
 

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
473,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top