[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Request] How about adding with-locale?
From: |
Mark H Weaver |
Subject: |
Re: [Request] How about adding with-locale? |
Date: |
Sat, 24 Mar 2012 13:56:43 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Nala Ginrut <address@hidden> writes:
> According to our talking on IRC. I dropped locale specific procedure
> setlocale in my code. I choose (web http) write-date instead.
> And my conclusion is to avoid locale specific things in multi-thread
> context.
It's okay to use locale-dependent operations in a multi-thread program,
as long as you use only one locale for the entire process.
Even in a single-thread program, locale-dependent operations are not
appropriate for protocol use, IMO anyway. For security reasons,
protocol code should be as simple as possible, but locale-sensitive code
tends to be much more complex. Also, it seems to me that locale
formatters/parsers are designed for _human_ interfaces, which have a
fundamentally different set of requirements than a protocol interface.
Regards,
Mark