The Forum for Discussion about The Third Manifesto and Related Matters

Please or Register to create posts and topics.

A Scheme library for the true RM

PreviousPage 3 of 3

Adding to which would be read-only operators that check constraints, so that instead of doing a UNION and then validating the result against some constraints, I can validate the constraints while I do the UNION.  I'm not sure which operators it makes sense to have validating versions of: perhaps all, perhaps not.

Quote from johnwcowan on June 20, 2019, 11:59 pm

Adding to which would be read-only operators that check constraints, so that instead of doing a UNION and then validating the result against some constraints, I can validate the constraints while I do the UNION.  I'm not sure which operators it makes sense to have validating versions of: perhaps all, perhaps not.

Hmmmmmmmm.  I've read these last few posts of yours in this thread and honestly, with every new "adding to which" I grew more convinced you're wasting your time and you've got more useful stuff to do.

"Validating versions" of [all the members of a set of] operators that [is/]are supposed to be user-extensible (RM VSS 7) ?

And way, way, weeeeeeeeeeeeeeigh more importantly than that, the essence of constraints involving UNION is ***not doing*** the union.  And the essence of constraints involving JOIN is ***not doing*** the join.  And the essence of constraints involving TCLOSE is ***not doing*** the closure.  etc. etc.

Quote from Erwin on June 21, 2019, 4:59 pm

Hmmmmmmmm.  I've read these last few posts of yours in this thread and honestly, with every new "adding to which" I grew more convinced you're wasting your time and you've got more useful stuff to do.

Well, on that score you may think what you like and so may I.  My thoughts are evolving, but I'm trying to do something that is both more and less ambitious than writing an implementation of Tutorial D, or for that matter D.

"Validating versions" of [all the members of a set of] operators that [is/]are supposed to be user-extensible (RM VSS 7) ?

It's always possible to do so, given the existence of a predicate (which I propose to make directly available to the programmer) that says "This relation does/does not conform to this set of constraints." The question is, which specific combinations should be prepackaged, if any?  That's a matter of library design.  In D, for example, there is INSERT corresponding to UNION and DELETE corresponding to RESTRICT (or rather its negation), but there is no update operator corresponding to TCLOSE; you have to do a relational assignment.  But hings could have been otherwise.

And way, way, weeeeeeeeeeeeeeigh more importantly than that, the essence of constraints involving UNION is ***not doing*** the union.  And the essence of constraints involving JOIN is ***not doing*** the join.  And the essence of constraints involving TCLOSE is ***not doing*** the closure.  etc. etc.

Sure, which is to say, an attempt to do so fails rather than returning a relation.  In Scheme one might (a) throw an exception; (b) pass two procedures as arguments, one to receive the relation and do further processing if necessary, and one to be called on failure; (c) return a Maybe Relation object.  Or lots of other possibilities.

 

PreviousPage 3 of 3