Re: Constructors motion 30 Version 2.
John,
I agree
Am 06.02.2012 14:31, schrieb John Pryce:
1. I have become more convinced that *at Level 1* an operation, at input(s)
where it does not have a natural value, should simply be undefined -- in a
Level 1 algorithm "f is undefined at x" makes unambiguous sense. I think
Vincent agrees, maybe others. Of course, at the implementation levels, a
value must be returned.
yes
2. I agree with those (Arnold, Dan, ...) who say there should only be
constructors of *decorated* intervals, not of bare intervals. This makes
constructors secure by default, in the sense that if a programmer wants to
discard a decoration that signals construction failure, they must do so
*explicitly*.
ok but wat is the default decoration ? postponed to the decorated version
All of (a,b,c) are bad design IMO.
yes, indeed
Constructors should be maximally
unforgiving, with the smallest domain in the Level 1 sense (= set of "OK"
inputs) needed to provide the desired facility. This makes it more
likely programmers are forced to think about what they really want.
[E.g. suppose u decreases below l in nums2interval(l,u). In a Kaucher
system that can be regarded as happening nice and continuously, but
*not* in a set-based system. Does the programmer really want Empty in
this case? A constructor error is best IMO.]
I agree
--
o Prof. Dr. Juergen Wolff von Gudenberg, Lehrstuhl fuer
Informatik II
/ \ Universitaet Wuerzburg, Am Hubland, D-97074 Wuerzburg
InfoII o Tel.: +49 931 / 31 86602
/ \ Uni E-Mail: wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx
o o Wuerzburg