From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: srfi-9 record type checking Date: Wed, 07 Jun 2006 18:42:56 +0200 Organization: LAAS-CNRS Message-ID: <87k67sudbj.fsf@laas.fr> References: <873behlvnw.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149698648 19168 80.91.229.2 (7 Jun 2006 16:44:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jun 2006 16:44:08 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 07 18:44:04 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fo17m-0001LI-Ge for guile-devel@m.gmane.org; Wed, 07 Jun 2006 18:43:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fo17m-0000a0-1B for guile-devel@m.gmane.org; Wed, 07 Jun 2006 12:43:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fo17j-0000YF-FJ for guile-devel@gnu.org; Wed, 07 Jun 2006 12:43:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fo17h-0000XU-Vc for guile-devel@gnu.org; Wed, 07 Jun 2006 12:43:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fo17h-0000XI-RN for guile-devel@gnu.org; Wed, 07 Jun 2006 12:43:13 -0400 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fo1FK-0005Wt-RP for guile-devel@gnu.org; Wed, 07 Jun 2006 12:51:07 -0400 Original-Received: by laas.laas.fr (8.13.6/8.13.4) with SMTP id k57GhA05025150; Wed, 7 Jun 2006 18:43:11 +0200 (CEST) Original-To: guile-devel@gnu.org X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 19 Prairial an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: guile-devel@gnu.org In-Reply-To: <873behlvnw.fsf@zip.com.au> (Kevin Ryde's message of "Wed, 07 Jun 2006 09:19:15 +1000") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0.496 () MAILTO_TO_SPAM_ADDR X-Scanned-By: MIMEDefang at CNRS-LAAS 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:5966 Archived-At: Hi, Kevin Ryde writes: > I guess `define-record-type' should be making a stricter procedure > than `record-accessor' gives. > > I got bitten by this using `record-accessor' the other day. For some > reason I thought it had strict type checking and scratched my head for > a while until realizing I was passing a wrong record and getting back > #f. Is that #f a feature? Would there be scope to add an option to > ask for a strict checking version? Or make that the default? I don't think we can add an optional argument to `record-accessor' while preserving the current behavior by default. That optional argument would have to be more than just a default value: typically it would have to be a wrong-type-arg handling procedure, and this would add too much overhead IMO (OTOH, one may argue that we shouldn't worry too much about overhead in error conditions). Instead, we could perhaps add `record-type-strict-accessor'? Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel