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.devel Subject: Re: for-each et al Date: Wed, 05 Mar 2014 23:32:16 +0100 Message-ID: <874n3cwa33.fsf@gnu.org> References: <87txbgr3wx.fsf@pobox.com> <87r46ks33b.fsf@gnu.org> <87wqg9ogf2.fsf@pobox.com> <87ob1l383j.fsf@gnu.org> <87r46g4dtn.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: ger.gmane.org 1394058749 21630 80.91.229.3 (5 Mar 2014 22:32:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2014 22:32:29 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 05 23:32:34 2014 Return-path: Envelope-to: guile-devel@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 1WLKMb-0002HA-W9 for guile-devel@m.gmane.org; Wed, 05 Mar 2014 23:32:34 +0100 Original-Received: from localhost ([::1]:54902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLKMb-00049B-It for guile-devel@m.gmane.org; Wed, 05 Mar 2014 17:32:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLKMS-00044d-Cu for guile-devel@gnu.org; Wed, 05 Mar 2014 17:32:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLKMN-0001Rh-Ef for guile-devel@gnu.org; Wed, 05 Mar 2014 17:32:24 -0500 Original-Received: from hera.aquilenet.fr ([2a01:474::1]:45225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLKMN-0001Ra-8c for guile-devel@gnu.org; Wed, 05 Mar 2014 17:32:19 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 0303F1E9F; Wed, 5 Mar 2014 23:32:18 +0100 (CET) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G9IApMLg49xB; Wed, 5 Mar 2014 23:32:17 +0100 (CET) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 9D84F1D70; Wed, 5 Mar 2014 23:32:17 +0100 (CET) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?utf-8?Q?Vent=C3=B4se?= an 222 de la =?utf-8?Q?R?= =?utf-8?Q?=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: <87r46g4dtn.fsf@pobox.com> (Andy Wingo's message of "Wed, 05 Mar 2014 20:59:00 +0100") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:474::1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16949 Archived-At: Andy Wingo skribis: > On Tue 04 Mar 2014 23:35, ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >> I suspect SCM_SETCAR/SCM_SETCDR are actually more widespread than >> their Scheme counterparts, and probably much harder to avoid. What >> can we do with them? > > Depends. If they are used to build up a data structure, I wouldn't > worry -- it's not detectable by Scheme except via continuation hacks. > There are only about 70 places in libguile itself that we use SETCDR, > and 30 or so for SETCAR. Not that bad. About 40 callers of > scm_reverse_x though. Right, maybe that=E2=80=99s not too scary. >> Another issue: what about elisp? It needs mutable pairs, but we don=E2= =80=99t >> want to have it use a disjoint type. > > A very good question, and I don't know. Would a tc7 mutable-pair type > be that bad? Could we do it with a tc3 instead? Dunno. This could > make it impossible. The question IMO is not about tagging, but about having a disjoint type. I think the whole idea behind elisp support was that it could use the very same data types as Scheme code, which would no longer be the case if mutable pairs and immutable pairs were disjoint. >>> * Introducing a #!lang facility, and having programs with #!lang make >>> immutable pairs >> >> Not really fan of the idea. :-) > > Why not? It makes it clear what's in scope at the beginning of a file, > which is a nice advantage. I have mixed feelings: as a way to save a few use-modules, it=E2=80=99s loo= ks both convenient and hackish (you can=E2=80=99t #!lang several languages typically, right?). Thanks, Ludo=E2=80=99.