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

Re: Distinction between 1/0 and 1/Empty



Nate Hayes wrote:
Arnold Neumaier wrote:
Nate Hayes wrote:
That's all sensible, but I don't see it constitutes an advantage: it simply trades one shortcoming for another.

I would support adding a new decoration, i.e., expanding the total number of decorations from five to six:

   D4 = safe (defined, continuous, bounded)
   D3 = everywhere defined
   D2 = somewhere defined, somewhere undefined
   D1 = everywhere undefined on real inputs (e.g., 1/0)
   D0 = everywhere undefined on empty input (e.g., 1/Empty)
   DX = ill-formed (bug)

Newbie-friendly functions such as isUndefined() can simply return TRUE if the decoration is D1 or D0, and DX is then reserved as you and Jurgen would like as special case for things such as invalid constructions and/or uninitialized data, etc.

My proposal allows to split decorations; but the splitting should not be made mandatory. So the standard should not distinguish between 1/0 and 1/Empty, but implementations that care for finer information are free to split it.

Thus both you and I can be satisfied.


Well, our proposal allows splitting of decorations, as well, so I could say the same to you. But something tells me you wouldn't be satisfied with that for the same reasons I wouldn't be satisfied with what you just mentioned. ;-)

The problem is that your old proposal was incompatible with mine, whereas your new one is a refinement of mine. Thus in the old wersion, coexistence was not possible, while in the new version, coexistence is possible with requiring mine (which has the advantage of greater simpklicity and a uniformly defined semantics) and allowing yours.