[std-interval] More on interval computations as proofs

Sylvain.Pion at sophia.inria.fr Sylvain.Pion at sophia.inria.fr
Sat Oct 7 23:30:03 PDT 2006


> Dr John Pryce <j.d.pryce at ntlworld.com> writes:
>
> | All
> |
> | There seems a consensus, and so far no sharp opposition, that we
> | should implement the DISCONT flag as a global, thread-local flag and
> | accept the limitations on optimization that this entails, as per
> | Sylvain's posting:
>
> I disagree with the global flag suggestion and will seriously raise
> that issue within the C++ LWG.  I would really like the proposal to
> take the objection seriously.
>
> I had a chance, yesterday, to talk  bit about this issue with my
> colleagues here -- also involved in the C++ standardization -- and the
> reaction was unanimous.

Do you have anything concrete to propose as a better
alternative ?

Throwing exceptions was shot down for speed and
stack-destroying reasons, and addition of a bool&
argument is not liked because it is a poorly
readable notation.


I thought about it a bit more than what I wrote so far.
You mentionned exceptions.  What I recognize is good with
exceptions here is the "scope" that they encapsulate,
which corresponds to what we are looking for.  However,
they are too costly when they throw (and there is no sign
that this will improve in the future as this is not their
goal).  I then wondered if we could invent, possibly with
a language extension, a non-stack-destroying way to report
errors corresponding to a "scope" similar to what exceptions
cover.  I think that this is possible through a list of
flags put on the stack and linked together, with the top
of the stack pointed to by a global pointer.
I do not believe that this can help much performance-wise
anyway compared to the gloabl flag solution, as there is
still a global thing somewhere.
I don't know precisely how exceptions work, but they
probably use some global information somewhere as well.

I am all for a better solution to be proposed than a
global flag.  I have just not seen it yet, and my limited
brain still cannot generate one.

-- 
Sylvain




More information about the Std-interval mailing list