[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9776: case-lambda should accept zero clauses
From: |
Andy Wingo |
Subject: |
bug#9776: case-lambda should accept zero clauses |
Date: |
Sat, 09 Mar 2013 11:17:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
On Sat 02 Mar 2013 19:13, Andy Wingo <address@hidden> writes:
> Picking up an old thread. What do people think about the attached
> patch? It preserves arity checking for case-lambdas defined in the same
> compilation unit. Case-lambdas are converted to nullary procedures in
> the last minute, before compiling or memoizing. Calling one of these
> procedures with arguments will still produce an arity-check warning;
> calling one without arguments will not. In both cases a
> wrong-number-of-args exception is thrown at runtime (either by the
> normal argument count check or via the explicit throw in the body).
>
> I think allowing lambda-body to be #f is the right way to go because it
> precludes inlining of ((case-lambda)).
>
> I'll push soon if there are no comments.
Pushed. Later we can figure out a way to warn for all applications of
(case-lambda), regardless of arity.
Andy
--
http://wingolog.org/