From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: case-lambda integration Date: Thu, 22 Oct 2009 23:15:26 +0200 Message-ID: <87y6n3m8pd.fsf@gnu.org> References: <873a5n2fsf.fsf@gnu.org> <8763a89zlr.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1256246381 13900 80.91.229.12 (22 Oct 2009 21:19:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2009 21:19:41 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 22 23:19:28 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N154A-0004m5-9Q for guile-devel@m.gmane.org; Thu, 22 Oct 2009 23:19:26 +0200 Original-Received: from localhost ([127.0.0.1]:54652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1548-0001or-Ip for guile-devel@m.gmane.org; Thu, 22 Oct 2009 17:19:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1511-0000AS-1c for guile-devel@gnu.org; Thu, 22 Oct 2009 17:16:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N150w-00008q-NX for guile-devel@gnu.org; Thu, 22 Oct 2009 17:16:10 -0400 Original-Received: from [199.232.76.173] (port=40138 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N150w-00008g-5F for guile-devel@gnu.org; Thu, 22 Oct 2009 17:16:06 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:44884) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N150v-0003Yf-LE for guile-devel@gnu.org; Thu, 22 Oct 2009 17:16:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N150q-0003UI-Fg for guile-devel@gnu.org; Thu, 22 Oct 2009 23:16:00 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Oct 2009 23:16:00 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Oct 2009 23:16:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Brumaire an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:OOR8wlmi/EEz2v5eqXx14W9z9aA= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9557 Archived-At: Hi! Andy Wingo writes: > On Thu 22 Oct 2009 00:00, ludo@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 ) (b )) > (specific-frob a b)) > ((a b) > (general-frob a b))) > > => (case-lambda* > ((a b #:predicate (and (eq? (class-of a) ) > (eq? (class-of b) ))) > (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’.