unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Zefram <zefram@fysh.org>
To: Ludovic Courtes <ludo@gnu.org>
Cc: 24186@debbugs.gnu.org
Subject: bug#24186: setlocale can't be localised
Date: Tue, 11 Oct 2016 13:49:59 +0100	[thread overview]
Message-ID: <20161011124959.GI533@fysh.org> (raw)
In-Reply-To: <87h98j1f9k.fsf@gnu.org>

Ludovic Courtes wrote:
>That wouldn't help with the "setlocale" issue you describe per se, but
>this would address such use cases in a different way.
>
>WDYT?

Yes, explicit locale objects and locale parameters to relevant functions
are a good thing.  In general, the model of a global locale state is
broken, at least by threading, so some advance beyond the setlocale system
is necessary.  Note the new(er) "uselocale" system in libc, which gives
a per-thread locale state, fixing the biggest problem with setlocale.
Some form of that could also be mapped into Guile; it would be reasonable
to have a fluid that determines the locale to use where not overridden
by an explicit parameter.

All of that is welcome, but, as you say, doesn't deal with the actual
problem I identified with setlocale.  One can expect that setlocale will
continue to be used for the foreseeable future, and it needs to be shorn
of its unwanted side effects.

-zefram





      reply	other threads:[~2016-10-11 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 16:32 bug#24186: setlocale can't be localised Zefram
2016-08-08 20:33 ` Andy Wingo
2016-08-08 22:30   ` Zefram
2016-08-09 12:15     ` Zefram
2016-08-09 17:43       ` Andy Wingo
2016-10-11  8:06     ` Ludovic Courtès
2016-10-11 12:49       ` Zefram [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=20161011124959.GI533@fysh.org \
    --to=zefram@fysh.org \
    --cc=24186@debbugs.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).