From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#11198: prefab structs in guile Date: Thu, 05 Jul 2012 23:55:26 +0200 Message-ID: <874npldga9.fsf__3815.78299352459$1341525377$gmane$org@gnu.org> References: <877gui7i3y.fsf@pobox.com> <87ipe2dizn.fsf@gnu.org> <878vex534f.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1341525377 27490 80.91.229.3 (5 Jul 2012 21:56:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2012 21:56:17 +0000 (UTC) Cc: 11198@debbugs.gnu.org, guile-devel To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jul 05 23:56:16 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Smu23-0001i8-7L for guile-bugs@m.gmane.org; Thu, 05 Jul 2012 23:56:15 +0200 Original-Received: from localhost ([::1]:43706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smu22-00053J-3i for guile-bugs@m.gmane.org; Thu, 05 Jul 2012 17:56:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smu1z-00053C-6K for bug-guile@gnu.org; Thu, 05 Jul 2012 17:56:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Smu1w-0002Zd-8j for bug-guile@gnu.org; Thu, 05 Jul 2012 17:56:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smu1w-0002ZC-69 for bug-guile@gnu.org; Thu, 05 Jul 2012 17:56:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Smu6g-00077N-20 for bug-guile@gnu.org; Thu, 05 Jul 2012 18:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 05 Jul 2012 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11198 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 11198-submit@debbugs.gnu.org id=B11198.134152562726774 (code B ref 11198); Thu, 05 Jul 2012 22:01:02 +0000 Original-Received: (at 11198) by debbugs.gnu.org; 5 Jul 2012 22:00:27 +0000 Original-Received: from localhost ([127.0.0.1]:51098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Smu67-0006xL-H5 for submit@debbugs.gnu.org; Thu, 05 Jul 2012 18:00:27 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:54482) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Smu64-0006rH-5C for 11198@debbugs.gnu.org; Thu, 05 Jul 2012 18:00:25 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 8601FE049; Thu, 5 Jul 2012 23:55:27 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OYH9NJkNzTzN; Thu, 5 Jul 2012 23:55:27 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id E844FB968; Thu, 5 Jul 2012 23:55:26 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Messidor an 220 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <878vex534f.fsf@pobox.com> (Andy Wingo's message of "Thu, 05 Jul 2012 23:06:56 +0200") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6396 Archived-At: Hi, Andy Wingo skribis: > Since the expression reader can generate prefab instances, they are > useful when convenient serialization is more important than > abstraction. Opaque and transparent structures also can be serialized, > however, if they are defined with define-serializable-struct as > described in Datatypes and Serialization. So I=E2=80=99d be in the =E2=80=98define-serializable-struct=E2=80=99 camp,= so to speak. Prefabs raise an number of interesting issues. For instance, what=E2=80=99= s the meaning of #s(sprout bean #f 17) in a module where =E2=80=98sprout=E2=80=99= is unbound? In a module where it=E2=80=99s bound to a given RTD vs. in a module where i= t=E2=80=99s bound to a different RTD? Does =E2=80=98read=E2=80=99 have to be current-m= odule-aware? Etc. This example is a bit scary to me: > (define lunch '#s(sprout bean)) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 > (struct sprout (kind) #:prefab) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 > (sprout? lunch)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 #t=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 since it implies that types are compared by name. Thanks, Ludo=E2=80=99.