Record-type predicate Takashi Kato (17 Jul 2016 19:19 UTC)
Re: Record-type predicate Marc Nieper-Wißkirchen (18 Jul 2016 14:35 UTC)
Re: Record-type predicate John Cowan (18 Jul 2016 15:23 UTC)
Re: Record-type predicate Takashi Kato (18 Jul 2016 19:47 UTC)
Re: Record-type predicate Marc Nieper-Wißkirchen (22 Jul 2016 11:23 UTC)

Re: Record-type predicate John Cowan 18 Jul 2016 15:23 UTC

Marc Nieper-Wißkirchen scripsit:

> The record-type predicate has to be a procedure in order to function
> as a genuine predicate. If we don't want to index these functions in
> (weak) hash tables, I don't see a way to get meta-data about a
> procedure other than calling it. But this may be disastrous if an
> unknown procedure is called.

There's no *portable* way to get metadata out of a procedure.  But at
least some Scheme implementations do associate metadata with procedure
objects.  SRFI 102 (withdrawn) is about providing arity (number of
arguments) metadata, and Chicken allows the creation of procedures with an
associated slot for metadata, though the slot is not present by default.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Unless it was by accident that I had offended someone, I never apologized.
        --Quentin Crisp