unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guile Devel <guile-devel@gnu.org>
Subject: Re: Should guile-3.0 cond-expand guile-2 and guile-2.2?
Date: Tue, 10 Mar 2020 21:52:11 -0500	[thread overview]
Message-ID: <87lfo7mwmc.fsf@trouble.defaultvalue.org> (raw)
In-Reply-To: <87wo7wi48r.fsf@gnu.org>

Ludovic Courtès <ludo@gnu.org> writes:

> Rob Browning <rlb@defaultvalue.org> skribis:
>
>>   $ guile-3.0 -c '(display (cond-expand (guile-2.2 "?\n")))
>>   ?
>>
>> Is that intentional?
>
> I think so, though I don’t 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
-- 
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



  reply	other threads:[~2020-03-11  2:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  7:30 Should guile-3.0 cond-expand guile-2 and guile-2.2? Rob Browning
2020-03-07 15:17 ` Ludovic Courtès
2020-03-11  2:52   ` Rob Browning [this message]
2020-03-11 13:59     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfo7mwmc.fsf@trouble.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).