unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: jgart <jgart@dismail.de>
Cc: Guix Help <help-guix@gnu.org>
Subject: Re: When do you re-export?
Date: Sat, 22 Oct 2022 10:15:29 -0400	[thread overview]
Message-ID: <87fsfgt05a.fsf@gmail.com> (raw)
In-Reply-To: <20221011162848.GB19896@dismail.de> (jgart@dismail.de's message of "Tue, 11 Oct 2022 16:28:48 -0500")

Hi jgart,

jgart <jgart@dismail.de> writes:

> Hi,
>
> When should I re-export something in a module?
>
> docs say the following:
>
> Add all variables (which must be symbols or pairs of symbols) to the
> list of re-exported bindings of the current module. Pairs of symbols
> are handled as in export. Re-exported bindings must be imported by the
> current module from some other module.
>
> The docs don't explain why you would want to even do a re-export in the first place...

I've used in two places, I think:

1. Move code around while preserving backward compatibility.
2. For convenience (when people importing B would typically also want
something from A).

Best used very sparingly, or not at all, I'd say :-).

-- 
Thanks,
Maxim


      parent reply	other threads:[~2022-10-23 22:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 21:28 When do you re-export? jgart
2022-10-12  6:21 ` Wojtek Kosior via
2022-10-22 14:15 ` Maxim Cournoyer [this message]

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87fsfgt05a.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=jgart@dismail.de \
    /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).