Re: SRFI 198 and the Schemeregistry Lassi Kortela 30 Aug 2020 14:01 UTC

Thanks for getting back to this. That's a good summary.

> So I ask, in Lassi's vision of SRFI 198, how would an author of an
> Oracle interface easily and with the least friction discover on
> registry.scheme.org that there is a 'sqlstate convention, and the
> multiple sub-conventions "under" 'sqlstate.

I would do something like this:

(make-foreign-status
  'set 'oracle-ORA
  'code 12154
  'sqlstate "08004"
  'message "TNS could not resolve service name")

Or:

(make-foreign-status
  'oracle-ORA 12154
  'sqlstate "08004"
  'message "TNS could not resolve service name")

These rely on the fact that someproperty names only make sense with
particular foreign interfaces. 'oracle-ORA only makes sense with Oracle,
so instead of testing whether a 'convention key is set to 'oracle, you
can test whether an 'oracle-ORA property (for example) is #f or non-#f.
Non-Oracle statuses don't have an 'oracle-ORA so it defaults to #f.

Likewise, 'sqlstate only makes sense with SQL databases; if you find it,
you can be quite sure that the status is from an SQL database.

I would solve most problems by a similar method. The usability of the
result would rely a lot on picking good property names. It seems like a
disadvantage to rely on human ingenuity like this, until you consider
that dividing properties into groups also requires similar ingenuity.

The reason I prefer to carefully pick good property names, instead of
carefully dividing properties into groups, is that I believe humans have
less aptitude at grouping than at inventing individually unambiguous things.