Re: Should foreign-status properties be divided into sets or not? hga@xxxxxx 17 Aug 2020 16:11 UTC

> From: Lassi Kortela <xxxxxx@lassi.io>
> Date: Monday, August 17, 2020 10:51 AM
>
>>> John and I very strongly desire what I'm now calling the 'convention
>>> key, you refuse to explain your allergy to having one mandated key,
>>> why it ... /ruins???/ your vision of the SRFI.
>>
>> I think he _has_ explained it, and I'm willing to put in more time on
>> it.  It's not a blocker really, since the use of 'convention is only,
>> er, a convention.  It's just a question of how hard SRFI 198 pushes it,
>> which is a tiny change to the SRFI and a tiny change to the
>> implementation to check it or not at creation time.
>
> Thanks. Agree:
>
> - What if an object conforms to more than one convention?

Flip a coin and pick one?

Let's continue to get concrete: can you supply examples where having to
pick an One Key will cause grief?

> - What if it doesn't conform to any?

That's what the 'status and 'error conventions are for, by definition
they are formless, require no other keys.  Also there if you just
don't want to go to the trouble of defining a full fledged convention.

> [ Lassi concisely restates his vision with a great deal of precision. ]

That said, it's still incompatible with my vision of having the One Key.

> I agree with Harold that being able to ask questions like "did this
> error come from libsodium?" is very important. However, an '(origin
> libsodium) property, independent of other properties, ought to do the
> job as well as a master key. As usual, the name is up for debate.

'libsodium became a "sub-master" key under 'generic-c-lib, the latter a
convention for all C *style* libraries that return a success or failure
value, and have no further form, do not innately further structure the
error, besides of course there being a 'foreign-interface like the
'sodium-init C function that failed.

Hmmm, and perhaps following your vision, "generic-c-lib" is somewhat
lacking, for it captures history more than it captures form, this is
certainly not a style that's limited to C libraries.  Something more
like generic-binary-return-lib???

OK, there's one argument in your favor, naming is hard, and if you're
ambitious, this may require coming up with another good name, or
having to decide to pick one from the existing conventions.  In fact,
if you don't punt to 'status or 'error, you're duty bound to check
Schemeregisty if you don't already know a convention it belongs to,
before coming up with your own new convention.

- Harold