unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Core Guile bindings
Date: Sun, 26 Feb 2017 19:30:39 +0100	[thread overview]
Message-ID: <87fuj0u7n4.fsf@pobox.com> (raw)
In-Reply-To: <CAMFYt2Z4RGhX5ATJM5knsdY8s=PPAh-KLMKR6J5Rw9iKjrwZyQ@mail.gmail.com> (Panicz Maciej Godek's message of "Wed, 12 Oct 2016 20:18:41 +0200")

On Wed 12 Oct 2016 20:18, Panicz Maciej Godek <godek.maciek@gmail.com> writes:

> I've noticed that Guile core contains some bindings that shouldn't
> necessarily be globally available. In particular, it provides a set of
> socket-related functions with very general names, such as "select" or
> "bind", that some programmers may want to use for their own purposes.
>
> It is obvious that those functions should not be a part of the core, and
> should be moved to some separate module, and so I wanted to ask whether
> there are any plans for doing so?

Besides everything that everyone said -- I actually think that it *is*
possible to migrate bindings over time.  In 2.2 I have moved the threads
exports (current-thread, call-with-new-thread, lock-mutex, etc) to
(ice-9 threads).  However when built with deprecated code (the default),
we also export these bindings in (guile).  They cause a deprecation
warning if you use them, telling you to change your program to
explicitly use (ice-9 threads).  So migration of this kind is possible;
even within the 2.2 series more code can be put into modules.

That said while I think reducing the set of default bindings is a good
it is not without tradeoffs.  Modularizing guile's core bindings isn't
really an active development focus.

Of course there are mitigations as well also; defining "select" in your
module works just fine, exporting it works fine, and users can resolve
the conflicts if needed.  You also have #:replace if you think that your
module should be the one making that decision.

Andy



      parent reply	other threads:[~2017-02-26 18:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 18:18 Core Guile bindings Panicz Maciej Godek
2016-10-12 18:21 ` Thompson, David
2016-10-12 19:18   ` Panicz Maciej Godek
2016-10-12 19:20     ` Thompson, David
2016-10-13 13:39       ` Ludovic Courtès
2016-10-13 18:19         ` Arne Babenhauserheide
2016-10-13 18:32           ` Panicz Maciej Godek
2016-10-14  8:31             ` Arne Babenhauserheide
2016-10-14 15:53           ` Robin Templeton
2017-02-26 18:30 ` Andy Wingo [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://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=87fuj0u7n4.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=godek.maciek@gmail.com \
    --cc=guile-user@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).