Hi!

Andy Wingo <wi...@pobox.com> writes:

> On Thu 22 Oct 2009 00:00, l...@gnu.org (Ludovic Courtès) writes:

[...]

>> So the keyword alist is new meta-data stored alongside the procedure,
>> right?
>
> Yes. It is stored in the procedure's object table.
>
> The metadata itself does change on this branch. Before the metadata was
> a thunk returning (BINDINGS SOURCES . PROPERTIES); now the thunk returns
> (BINDINGS SOURCES ARITIES . PROPERTIES). Arities is an
> extents-delimited description of the procedure's arities, for debugging
> and printing purposes.

OK, thanks for explaining.

> One more thing in lambda* -- I have added a #:predicate option, so that
> this particular lambda case only matches if evaluating the predicate in
> the lexical context of the arguments returns a true value.
>
> This should allow:
>
>   (typecase-lambda
>     (((a <foo>) (b <bar>))
>      (specific-frob a b))
>     ((a b)
>      (general-frob a b)))
>
>   => (case-lambda*
>        ((a b #:predicate (and (eq? (class-of a) <foo>)
>                               (eq? (class-of b) <bar>)))
>         (specific-frob a b))
>        ((a b)
>         (general-frob a b)))
>
> Thus it allows effective-method implementation in Scheme and not
> using evaluator #...@dispatch hacks :-)))

Sounds cool, and indeed refined compared to the evaluator hacks.

I’m looking forward to seeing all this land in ‘master’!

>> So (ice-9 optargs) could very much be deprecated?  There may be subtle
>> corner cases needing attention, though.
>
> Sure that would be possible. For 1.8 -> 2.0 reasons we can just make
> optargs re-export lambda* from the base environment, and deprecate
> optargs in 2.2.

Yeah, excellent.

Ludo’.



Reply via email to