Op 19-12-2021 om 11:41 schreef Darren Duncan: > On 2021-12-19 2:01 a.m., Martijn Lievaart wrote: >> >> So what does Excuse("unknown value") plus Excude("unauthorized) >> return? You just reintroduced the same problem that made you decide >> against NVL, unless I'm missing something. > > The answer is that attempting to do that fails because addition is not > defined for Excuse values. For example, it could result in something > like: > > Excuse("No_Matching_Routine_Found", "plus", [@_]) > > That Excuse value can either be returned, or if desired, thrown as an > exception. > > A key part of what makes this NOT N-valued-logic is that the result of > trying to use some arbitrary non-existent routine with an Excuse value > always returns the same base result, an Excuse of subtype > "No_Matching_Routine_Found", with added info naming the name and > arguments attempted, and that there is NOT logic to test every > possible Excuse subtype to determine what kind of result to give. > > Basically an Excuse is an unthrown exception, and is treated similarly. > > In this context, the version where there is exactly the 1 singleton > Unknown etc is analagous to die() always throwing the same generic > exception "I died" without any further information. > Ahh, makes sense. I'm still not completely convinced it's a good idea (nor saying it isn't!), but I agree you solved the original problem. HTH, M4Thread Previous | Thread Next