proposing a simpler mechanism R. Kent Dybvig (13 Nov 2009 03:00 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 04:23 UTC)
Re: proposing a simpler mechanism Taylor R Campbell (13 Nov 2009 04:31 UTC)
Re: proposing a simpler mechanism R. Kent Dybvig (13 Nov 2009 16:22 UTC)
Re: proposing a simpler mechanism Per Bothner (13 Nov 2009 16:56 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 04:54 UTC)
Re: proposing a simpler mechanism Alex Queiroz (13 Nov 2009 13:44 UTC)
Re: proposing a simpler mechanism Marc Feeley (13 Nov 2009 14:24 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 18:39 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 18:36 UTC)
Re: proposing a simpler mechanism Alex Queiroz (13 Nov 2009 19:08 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 19:21 UTC)
Re: proposing a simpler mechanism David Van Horn (13 Nov 2009 19:25 UTC)
Re: proposing a simpler mechanism Thomas Bushnell BSG (13 Nov 2009 19:36 UTC)
Re: proposing a simpler mechanism David Van Horn (13 Nov 2009 19:58 UTC)
Re: proposing a simpler mechanism Arthur A. Gleckler (13 Nov 2009 20:25 UTC)
Re: proposing a simpler mechanism David Van Horn (12 Jan 2010 18:51 UTC)

Re: proposing a simpler mechanism Thomas Bushnell BSG 13 Nov 2009 19:36 UTC

Case-lambda is not a part of standard scheme.  If you mean srfi-16,
notice the way the reference implementation works.  It defines a
procedure with a formals list that looks like this:

(lambda args ....)

That would be an arity of "0, #t" in my system.

Indeed, the

Now, the procedure it generates happens to do
  (error "Wrong number of arguments to CASE-LAMBDA.")
under various circumstances.

I assume you want to pretend that this error is the "same" as the error
one gets for calling (lambda (x) ...) with other than exactly one
argument.  But why?

*Exactly* which errors are the errors referred to by this arity checking
thing?

If you mean "the parameters in the lambda specification", then
case-lambda defines procedures with entirely indefinite arity (just look
at the lambda expressions!).

Alternatively, if you want to insist that case-lambda arities must be
the "expected" ones for the metaphysical notion of arity, then please
add to srfi 102 mention that the reference implementation of srfi 16 is
now incorrect, and indeed, cannot be portably implemented together with
srfi 102.

Thomas

On Fri, 2009-11-13 at 14:25 -0500, David Van Horn wrote:
> Thomas Bushnell BSG wrote:
> > On Fri, 2009-11-13 at 19:01 +0000, Alex Queiroz wrote:
> >> Hallo,
> >>
> >> On 11/13/09, Thomas Bushnell BSG <xxxxxx@becket.net> wrote:
> >>> So what?  Are we now making srfi's have an inelegant interface because
> >>>  some implementations implement standard scheme poorly?
> >>>
> >>      Implementing integer sets is a bit difficult with "elegant" Scheme.
> >
> > We don't need integer sets.  Scheme does not specify any lambda syntax
> > other than "this is the minimum number of parameters" and "there may be
> > extra parameters".  The only meaning I can understand for "arity" is
> > with reference to the formals lists in lambda expressions.  Some other
> > folks seem to have a rather more metaphysical understanding in mind, but
> > I can't quite figure out just what they mean by it.
>
> Disjoint arities arise from case-lambda forms, which are a part of
> Scheme.  No metaphysics needed.
>
> David