Splitting foreign-error:code Lassi Kortela (27 Jul 2020 06:46 UTC)
Re: Splitting foreign-error:code Lassi Kortela (27 Jul 2020 08:26 UTC)
Re: Splitting foreign-error:code Lassi Kortela (27 Jul 2020 08:51 UTC)
Re: Splitting foreign-error:code John Cowan (28 Jul 2020 19:25 UTC)
Re: Splitting foreign-error:code for SRFI 198, Foreign Errors Lassi Kortela (27 Jul 2020 23:59 UTC)
Flat vs nested alist Lassi Kortela (27 Jul 2020 23:50 UTC)
Re: Flat vs nested alist Lassi Kortela (27 Jul 2020 23:53 UTC)
Re: Flat vs nested alist John Cowan (28 Jul 2020 03:06 UTC)
Pre-SRFI for property list utilities Lassi Kortela (28 Jul 2020 07:35 UTC)
Re: Pre-SRFI for property list utilities hga@xxxxxx (28 Jul 2020 11:00 UTC)
Plist utilities and SRFI 198 Lassi Kortela (28 Jul 2020 11:08 UTC)
Re: Plist utilities and SRFI 198 John Cowan (28 Jul 2020 18:12 UTC)
plist pre-SRFI hga@xxxxxx (12 Aug 2020 15:14 UTC)
Re: plist pre-SRFI John Cowan (12 Aug 2020 15:21 UTC)
Re: plist pre-SRFI John Cowan (12 Aug 2020 15:53 UTC)
Re: plist pre-SRFI hga@xxxxxx (12 Aug 2020 15:58 UTC)
Re: plist pre-SRFI John Cowan (12 Aug 2020 16:59 UTC)
Re: plist pre-SRFI hga@xxxxxx (12 Aug 2020 17:34 UTC)
Re: plist pre-SRFI John Cowan (12 Aug 2020 19:37 UTC)
Use of SRFI 198 in SRFI 170 hga@xxxxxx (12 Aug 2020 20:04 UTC)

Re: Splitting foreign-error:code for SRFI 198, Foreign Errors Lassi Kortela 27 Jul 2020 23:59 UTC

> +1.  It also makes matters extensible, which having a fixed collection
> of functions does not.

Concurred, extensibility is needed in any case.

> The standard keys, however, should be documented
> in the SRFI with generic explanations.

+1. Also any extra ones beyond those discussed in the SRFI should be
documented in the error-set registry.

>     But they can be
>     discovered simply by triggering an error in a REPL and noting all the
>     keys in foreign-error:code.
>
> I want to register my continuing objection to reflective functions in
> this SRFI, particularly since they may return an unexpectedly large or
> small amount of information.   Rather than having functions that return
> "some of the error-sets / errors / whatever", stick to specific
> handling.  These lists are going to be unstable anyhow.

It's a good question how we should combine printing error objects from
the REPL with lazy-loaded error information. Should the printer
lazy-load anything at all? It could be expensive or fail.

In case you count error-set enumeration as a reflection, Oracle has
about 37 thousand errors!
<https://docs.oracle.com/pls/db92/db92.error_search?prefill=ORA->.

>     Another advantage is that having foreign-error:code fan out into an
>     alist doesn't require us *today* to anticipate every possible way
>     an error can be classified.

The same benefit can be had if we use one flat alist instead of an extra
nested alist for `code`.

> There are indeed systems that group errors into classes.  Historically
> this has been done by having a common prefix to the key.  Consider the
> first digit of an HTTP return message, for example.

True. How would we represent 1xx, 2xx, 3xx, 4xx as classes? FTP and IRC
have a similar numbering scheme if memory serves.