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: Fri, 06 Jul 2012 00:14:55 +0200 Message-ID: <87a9zdc0tc.fsf__31052.8893293396$1341526517$gmane$org@gnu.org> References: <877gui7i3y.fsf@pobox.com> <87ipe2dizn.fsf@gnu.org> <878vex534f.fsf@pobox.com> <874npldga9.fsf@gnu.org> <87ipe13lya.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 1341526516 30983 80.91.229.3 (5 Jul 2012 22:15:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2012 22:15:16 +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 Fri Jul 06 00:15:15 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 1SmuKP-0002vs-Kn for guile-bugs@m.gmane.org; Fri, 06 Jul 2012 00:15:13 +0200 Original-Received: from localhost ([::1]:45975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmuKO-0006zo-Jg for guile-bugs@m.gmane.org; Thu, 05 Jul 2012 18:15:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmuKL-0006zX-FH for bug-guile@gnu.org; Thu, 05 Jul 2012 18:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmuKJ-0000k5-Os for bug-guile@gnu.org; Thu, 05 Jul 2012 18:15:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmuKJ-0000jL-KC for bug-guile@gnu.org; Thu, 05 Jul 2012 18:15:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SmuP3-0007X0-HF for bug-guile@gnu.org; Thu, 05 Jul 2012 18:20:01 -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:20:01 +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.134152679428932 (code B ref 11198); Thu, 05 Jul 2012 22:20:01 +0000 Original-Received: (at 11198) by debbugs.gnu.org; 5 Jul 2012 22:19:54 +0000 Original-Received: from localhost ([127.0.0.1]:51115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmuOw-0007Wb-5h for submit@debbugs.gnu.org; Thu, 05 Jul 2012 18:19:54 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:54828) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmuOt-0007WT-HR for 11198@debbugs.gnu.org; Thu, 05 Jul 2012 18:19:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 428CBE43E; Fri, 6 Jul 2012 00:14:56 +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 mKnT14Yi-wUY; Fri, 6 Jul 2012 00:14:56 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id AC5A9DE91; Fri, 6 Jul 2012 00:14:55 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 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: <87ipe13lya.fsf@pobox.com> (Andy Wingo's message of "Fri, 06 Jul 2012 00:03:09 +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:6399 Archived-At: Hi, Andy Wingo skribis: > On Thu 05 Jul 2012 23:55, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> So I=E2=80=99d be in the =E2=80=98define-serializable-struct=E2=80=99 ca= mp, so to speak. > > That's a valid position to have in general. I can also imagine cases in > which you would choose other things. It's a spectrum. Yes, sure. It can be convenient to have something that makes it easy to serialize structs. But given that prefabs have to be =E2=80=9Cbuilt in=E2= =80=9D, and that they look can-of-wormey to my demanding eye ;-), I=E2=80=99d be in fav= or of anything built atop structs. And actually, there=E2=80=99s (oop goops save), which is extensible and everything. :-) Side note: while writing readers/writers by hand may look tedious, the advantage is that it makes it easy to leave room for future extensions, like allowing the reader to suitably map an old version of a serialized struct to the new data structure. >> Prefabs raise an number of interesting issues. For instance, what=E2=80= =99s the >> meaning of #s(sprout bean #f 17) in a module where =E2=80=98sprout=E2=80= =99 is unbound? > > Prefab structs are not modular. It is the same as in a module where > `sprout' is bound. Reading #s(sprout bean #f 17) may create an RTD if > needed, but it does not create any bindings. OK. So there can only be one =E2=80=98sprout=E2=80=99 prefab RTD in the wh= ole process, I guess. >> types are compared by name. > > As the documentation clearly indicates :), prefab structs are indeed > compared by name, though in a combination with other characteristics > (number of fields, and more characteristics for racket). Right. Argh. Thanks, Ludo=E2=80=99.