From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: Should guile-3.0 cond-expand guile-2 and guile-2.2? Date: Tue, 10 Mar 2020 21:52:11 -0500 Message-ID: <87lfo7mwmc.fsf@trouble.defaultvalue.org> References: <87blpktrlt.fsf@trouble.defaultvalue.org> <87wo7wi48r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="34608"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile Devel To: Ludovic =?utf-8?Q?Court=C3=A8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Mar 11 03:52:17 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBrTk-0008rJ-8w for guile-devel@m.gmane-mx.org; Wed, 11 Mar 2020 03:52:16 +0100 Original-Received: from localhost ([::1]:43090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBrTj-0006Sf-1a for guile-devel@m.gmane-mx.org; Tue, 10 Mar 2020 22:52:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBrTY-0006SW-NP for guile-devel@gnu.org; Tue, 10 Mar 2020 22:52:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBrTX-0006Qt-Gt for guile-devel@gnu.org; Tue, 10 Mar 2020 22:52:04 -0400 Original-Received: from defaultvalue.org ([45.33.119.55]:60240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jBrTX-0006Pa-CA; Tue, 10 Mar 2020 22:52:03 -0400 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 34052200D8; Tue, 10 Mar 2020 21:52:02 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 3B2F914E071; Tue, 10 Mar 2020 21:52:11 -0500 (CDT) In-Reply-To: <87wo7wi48r.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.33.119.55 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20445 Archived-At: Ludovic Court=C3=A8s writes: > Rob Browning skribis: > >> $ guile-3.0 -c '(display (cond-expand (guile-2.2 "?\n"))) >> ? >> >> Is that intentional? > > I think so, though I don=E2=80=99t think this was discussed here. > > The way I see it, it means that guile-3 is a superset of 2.2. OK, though that wasn't true for guile-2.2 with respect to 2.0? In any case, it'd be nice to have the policy documented, perhaps on the srfi-0 info page. At the moment, I just needed a way to write code that behaved differently with 3.0+ as compared to 2.2, because 2.2 doesn't support define-module #:re-export-and-replace, and there's no functional equivalent yet. For now I did this (I don't currently care about older than 2.2): (define (re-export-and-replace! . names) (cond-expand (guile-3.0 (module-re-export! (current-module) names #:replace? #t)) (guile-2.2 (module-re-export! (current-module) names)) (else (module-re-export! (current-module) names #:replace? #t)))) And migrated all the relevant symbols out of the define-module form. Do we think that the norm will be for releases to cond-expand the symbols for all their ancestors (up to some point)? i.e. guile 4 will likely cond expand guile-3, guile-3.0, guile-3.1, ... and guile-2, guile-2.2, and so on? Thanks --=20 Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4