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

Re: Constructors motion



On 12/29/2011 10:21 PM, Lee Winter wrote:
On Sat, Dec 3, 2011 at 9:27 AM, Corliss, George
<george.corliss@xxxxxxxxxxxxx>  wrote:
Yes, decorations are our substitute for exceptions.

So, is (Empty,n/f) a Level 2 implementation of the Level 1 concept
"Not an Interval"?

Are decorations (in whatever for we agree on) a Level 1 concept or
a Level 2 concept?

John is trying to maintain Level 1 as a mathematical model level?
So in (say) beginning graduate level real and complex variables (or
topology) classes, how do we treat something named by not existing?
1. By the concept of a domain, we try to avoid dealing with
functions not being defined.  2. We don't let it happen.  Who would
say, "Let x be a real number, except that it isn't?"

Perhaps the Level 1 concept of an interval constructor is "Let x be
an interval<blah>."  It returns an interval.

But the mathematical result of "undefined" is not an acceptable
computation result.  When discussing a mathematical function used
outside its domain one can simply say that the results is undefined.
That suggests that in the computation of a function used outside its
domain _requires_ a result equivalent to "undefined"

Both subject mater domains have the same requirement.


It is at the programming Level 2 that we need to ask, "Yeah, but
what if<blah>  is not a valid interval?"

As described above, one must raise that issue in both subject matter
domains.


Alternatively, suppose we view the constructor as a function whose
domain includes strings of characters that represent valid
intervals.  Doesn't our definition of functions of arguments
outside their domain already specify the interval("rubbish") MUST
return (Empty,n/f)?

No because one must interpret the conversion of "rubbish" as an
error. In computation, hiding errors is even worse than lying about
inclusion.


I think that the situation is more complex than that:
-1 a function is used outside its domain of definition because a programming error -2 a function is used outside its domain because a temporary overestimation of its arguments that will disappear over time

Hence what should be done is programming context different: in case 1 returning "undefined" is not satisfactory because we hide the error while in case 2 this is perfectly legitimate..

JPM