From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: "Göran Weinholt" <goran@weinholt.se>,
9776-done@debbugs.gnu.org,
"Ian Price" <ianprice90@googlemail.com>
Subject: bug#9776: case-lambda should accept zero clauses
Date: Sat, 09 Mar 2013 11:17:44 +0100 [thread overview]
Message-ID: <87d2v83mif.fsf@pobox.com> (raw)
In-Reply-To: <8738wdisam.fsf@pobox.com> (Andy Wingo's message of "Sat, 02 Mar 2013 19:13:21 +0100")
On Sat 02 Mar 2013 19:13, Andy Wingo <wingo@pobox.com> 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/
prev parent reply other threads:[~2013-03-09 10:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 10:15 bug#9776: case-lambda should accept zero clauses Göran Weinholt
2012-01-05 22:06 ` Ludovic Courtès
2012-01-08 4:45 ` Ian Price
2012-01-31 22:55 ` Ludovic Courtès
2012-02-01 5:07 ` Mark H Weaver
2012-02-02 22:16 ` Ludovic Courtès
2013-03-02 18:13 ` Andy Wingo
2013-03-09 10:17 ` Andy Wingo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2v83mif.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=9776-done@debbugs.gnu.org \
--cc=goran@weinholt.se \
--cc=ianprice90@googlemail.com \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).