Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Motion P1788/M0008.01_Exception_Handling



Michel Hack wrote:
I liked John Pryce's dissection of the motion, and appreciate the
replies by Arnold, Dan and Nate.  Here are some additional comments.

I too was confused by the notion that the interval part of a result
cannot depend on the decorations of the arguments.

But SOME operations must depend on
the decorations, or else those would be useless.  In fact, some
of them should even be vectorizable primitives, such as
  Y := MakeEmptyIfPossiblyUndefined(X)
or a more generic MakeEmptyIfFlagged(decorated_interval, flag_mask).

We were thinking of arithmetic operations and operations like
unions, not of operations that specifically respond to exceptions
in a user-directed way.

However, it seems to me that everything of interest can be achieved by
the forgetful operator that drops the interval part, together with
queries for extracting from a decoration a trit or testing for a particular combination of trits. This can be achieved by a more careful formulation of 2.3 (which already needed patching anyway).

For example, the suggested MakeEmptyIfFlagged(decorated_interval,
flag_mask) would probably be in each natural use replaceable by dropping the interval and continuing with the bare decoration, and if not, it could be replaced by testing for the combination and then creating
a new empty interval.


Arnold Neumaier