On Friday, November 15, 2019 at 10:19:29 AM UTC-5, Bonita Montero wrote:
> > The committee specifies that something is implementation-defined
> > whenever it believes that there can be a good reason why the developer
> > might need to know which choice an implementation has made.
>
> Ar there only idiots discussing here? It doesn't matter if the standard
> doesn't say how the exception-objects might be allocated. It is never-
> theless an interesting question.
I'm not denying that it might be an interesting question for some people
(I'm not particularly interested in it, myselft) - I'm merely explaining
why there are better places to go to get good answers to your question.
If you don't care whether the answers you get are good, or for that
matter, whether you get any answers at all, this is no worse a place to
post them than any other.
> If I had asked how exceptions are implemented with zero overhead when
> not thrown I'd got a lot of answers without the stupid objection, that
> the standard doesn't make any statements about this.
That's because the question of whether or not they can be (and have
been) implemented with zero overhead has a great deal of bearing upon
whether or not it's a good idea to use them in any particular
circumstance. The zero-overhead approach has the consequence that
exceptions, when used, are generally very slow. I've seen code that
threw and caught an exception within the same function, as a glorified
goto - and the fact that they are very slow is an important reason for
not doing that.
> Some folks here just can't bear that there's a question the can't
> answer which frustrades them that the say that this question doesn't
> matter.
It doesn't frustrate me that I can't answer it - the answer has no
importance for anything I've ever done or could ever imagine doing (I
don't imagine myself working as a developer for a C++ compiler, which is
the only context in which I would be interested in the answer). If it
had ever been important to me, I would have found out.
> > That's relevant here, because the way memory is allocated for exception
> > objects is a prime example of that second category. Since most
> > developers don't need to know, most developers don't know. Just a few
> > experts who know a lot more about how a given implementation works than
> > most people, will have the answers to Bonita's question, and most of
> > those people are much easier to find in a forum specific to the
> > implementation that they're experts on, than they would be in this
> > newsgroup.
>
> I didn't find a forum.
Virtually every major compiler has some kind of forum; gcc and microsoft
have dozens, if not hundreds of them - the hard part is choosing the
right one (and it IS a hard task). But the best place to find the right
gcc forum is to ask in a gcc forum, and similarly for Microsoft. Keep in
mind that usenet is not the only place to go to for discussion forums -
mailing lists and chat rooms are among the most common alternatives.