From: Mark H Weaver <mhw@netris.org>
To: Andy Wingo <wingo@pobox.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: Using libunistring for string comparisons et al
Date: Sat, 19 Mar 2011 10:06:51 -0400 [thread overview]
Message-ID: <87lj0bi4qs.fsf@netris.org> (raw)
In-Reply-To: <m3d3lnwau5.fsf@unquote.localdomain> (Andy Wingo's message of "Sat, 19 Mar 2011 13:31:30 +0100")
Andy Wingo <wingo@pobox.com> writes:
>> Ludovic, Andy and I discussed this on IRC, and came to the conclusion
>> that UTF-8 should be the encoding assumed by functions such as
>> scm_c_define, scm_c_define_gsubr, scm_c_define_gsubr_with_generic,
>> scm_c_export, scm_c_define_module, scm_c_resolve_module,
>> scm_c_use_module, etc.
>
> Can we step back a little and revisit this decision?
>
> Clearly, we need to specify the encoding for these procedures, and have
> it not be locale encoding. However I don't think we would be breaking
> anyone's code if we simply restricted it to 7-bit ASCII.
>
> I am quite sensitive to the "justice" argument -- that we not restrict
> the names our users give to Scheme identifiers, or the characters they
> use in their strings. But these values typically come from literals in
> C source code, which has no portable superset of ASCII.
Not everyone writes portable code. Who here limits their code to the
R6RS and avoids all Guile-specific features? Portability may be
something to strive for, but when compelling reasons dictate otherwise,
it's not unreasonable to limit your portability to better compilers like
gcc.
For those who don't speak English but wish to hack with Guile, being
able to write code in their own language is a compelling reason.
Anyway, one can only hope that some future C standard supports unicode,
but if the folks who control those standards don't give a damn about
non-english speakers, that doesn't mean we should follow their example.
> Furthermore, such a default would not restrict our users at all -- they
> can always use the non-_c_ variants with a symbol explicitly constructed
> with (e.g.) scm_from_utf8_symbol.
We have those convenience functions for a reason. You recently proposed
several more convenience functions, so apparently you prefer to save
keystrokes like the rest of us. I'm sure our non-english-speaking
comrades feel the same way.
Let me ask you this: why would you oppose changing the scm_c_ functions
to use UTF-8 by default? If you're comfortable with ASCII-only names,
then UTF-8 will work fine for you, since ASCII strings are unchanged in
UTF-8.
> Finally, users are moving away from these functions anyway. The thing
> to do now is to write Scheme, not C: and in Scheme we do the Right
> Thing.
If you write all your code in Scheme now, then you should care even less
about the scm_c_ functions. So why oppose what you recently agreed to?
As a meta-comment: I've grown rather weary from fighting this battle
alone. My hacking has completely stopped because of this argument. To
those of you out there who care about this issue, please let your voices
be heard. I know you're there, because a few of you stated your
opinions rather strongly on IRC. If others don't join in soon, I'm
likely to soon give up on this, and be left with rather less enthusiasm
for Guile than when I started, I'm sorry to say.
Mark
next prev parent reply other threads:[~2011-03-19 14:06 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 21:28 Using libunistring for string comparisons et al Mike Gran
2011-03-15 17:20 ` Mark H Weaver
2011-03-15 20:39 ` Mike Gran
2011-03-15 22:49 ` Mark H Weaver
2011-03-16 0:01 ` Mike Gran
2011-03-16 1:12 ` Mark H Weaver
2011-03-16 11:26 ` Ludovic Courtès
2011-03-17 15:38 ` Mark H Weaver
2011-03-17 15:56 ` Ludovic Courtès
2011-03-17 17:58 ` Mark H Weaver
2011-03-18 0:10 ` Thien-Thi Nguyen
2011-03-18 1:38 ` Mark H Weaver
2011-03-18 8:46 ` Thien-Thi Nguyen
2011-03-18 12:05 ` Mark H Weaver
2011-03-20 22:12 ` Ludovic Courtès
2011-03-30 10:14 ` Andy Wingo
2011-03-17 21:47 ` Ludovic Courtès
2011-03-19 12:31 ` Andy Wingo
2011-03-19 14:06 ` Mark H Weaver [this message]
2011-03-19 14:53 ` Noah Lavine
2011-03-19 15:49 ` Mark H Weaver
2011-03-19 15:08 ` Andy Wingo
2011-03-19 19:43 ` Mark H Weaver
2011-03-19 16:37 ` Mark H Weaver
2011-03-20 21:49 ` Ludovic Courtès
2011-03-30 9:50 ` Andy Wingo
2011-03-29 12:39 ` Peter Brett
2011-03-29 13:35 ` Andy Wingo
2011-03-29 21:15 ` Ludovic Courtès
2011-03-31 14:59 ` Peter Brett
2011-03-31 20:12 ` Ludovic Courtès
2011-03-30 9:33 ` Andy Wingo
2011-03-16 0:22 ` Alex Shinn
-- strict thread matches above, loose matches on Subject: below --
2011-03-17 18:07 Mike Gran
2011-03-16 15:22 Mike Gran
2011-03-16 16:58 ` Ludovic Courtès
2011-03-16 2:03 Mike Gran
2011-03-16 1:30 Mike Gran
2011-03-11 0:54 uc_tolower (uc_toupper (x)) Mike Gran
2011-03-11 22:33 ` Using libunistring for string comparisons et al Mark H Weaver
2011-03-11 22:36 ` Mark H Weaver
2011-03-11 23:09 ` Mark H Weaver
2011-03-12 13:46 ` Ludovic Courtès
2011-03-12 17:28 ` Mark H Weaver
2011-03-13 21:30 ` Ludovic Courtès
2011-03-30 9:05 ` Andy Wingo
2011-03-30 9:03 ` Andy Wingo
2011-03-31 14:19 ` Ludovic Courtès
2011-03-12 13:36 ` 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=87lj0bi4qs.fsf@netris.org \
--to=mhw@netris.org \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=wingo@pobox.com \
/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).