[plt-scheme] Why do MzScheme ports not respect the locale's encoding by default?

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Feb 19 15:48:18 EST 2005

On Feb 19, Jim Blandy wrote:
> 
> Eli Barzilay <eli at barzilay.org> writes:
> > 
> > It's impossible to get a meaningful answer to that.  You'll always
> > have both kind of users, and you'll always have cultural
> > differences that grow out of whatever.  I can only give Israel as
> > an example -- where native things are much farther away from
> > English than the average European language, but it's still much
> > closer to English than the average oriental language...  The
> > result is that for a long time nobody invested enough work to make
> > things work, so it just became stupid enough that anyone who cared
> > would just use English for everything.  Programmers in the company
> > I worked at always used the American versions of Windows, and most
> > people my age who did anything with computers still remember
> > typing in reverse.  The result is that you'll get many people
> > there who will definitely prefer working ascii software over
> > locale-aware-but-hopelessly-broken junk.
> 
> Let me try to re-state your point:
> 
>     Introducing locale-sensitivity is likely to complicate
>     applications to the point that even disabling locale-specific
>     behavior by setting LC_ALL=C (or the equivalent) won't get you
>     back to a working state.  Since locale-sensitive software is
>     likely to be buggy whether locales are enabled or disabled, it's
>     better to simply be locale-insensitive.
> 
>     If programmers were perfect, then certainly it would be better
>     to be locale-sensitive.  But the actual choice we have is
>     between software that correctly supports only a single locale,
>     and software that tries to support multiple locales and is
>     broken in all of them.
> 
> Is that essentially correct?

1. The problem is not really in the programmers, its in the fact that
   dealing with these issues is so complex.  To be a perfect
   programmer you would not only need to be able to deal with this,
   you would also need to be aware of cultural thing that will break
   your code in ways you can't even imagine -- since using a comma for
   floating point numbers is just as unimaginable as writing dates in
   an un-string-sortable way, climbing one flight of stairs to reach
   the second floor, having characters that have no width, or
   not-distinguishing some different characters since they're really
   the same...

2. You asked about opinions, I gave an opinion that is likely
   different than a typical European opinion.  There's really no way
   to classify it as correct or incorrect.


> Let's break down the situation a bit:
> 
> - Assuming everything is implemented correctly, are locale-sensitive
>   semantics helpful?

The definition of "correct" is not so simple.  Use any combination of
RTL and RTL text in some editor and you'll see weird things.  My point
was that in some places like Israel programmers gave up on many
things.  If I were a programmer in Israel, my opinion would be that
locale sensitiveness only for GUIs that are intended for
non-programmers.  When it gets to writing code, and tools for
programmers, there is no point in even trying.  (With things like
DrScheme standing an a strange place on this scale.)


> - How hard is it to correctly implement locale sensitivity?

Very.


> For the first point, there's a lot about the idea of having this big
> global setting that affects lots of things under the covers that I
> don't really like.

Yes.


> For the second point, I think we've implemented many other messier
> things just fine --- but they were all things that were important to
> enough people that we ground away at them until they actually
> worked.  If nobody really cares, and monolingual Americans do all
> the coding, then it's not going to turn out too well.

That's where you bump on the culture problem.  For an Israeli eyes it
seems perfectly reasonable to have an application working in Hebrew,
but for *coding* you'd never try anything with it, since that's just
asking for trouble.  Try to look at various source code from different
places -- how often did you see code with comments in German or
French?  Now *try* to find code with comments in Hebrew...


> So it's an Open Source marketing question: will supporting locale
> enlarge the software's audience enough to attract programmers who
> will contribute enough to make it work correctly?  How big is that
> enlargement?  How many technical people does it have?  You can get
> some portion of that audience by hard-coding UTF-8, so locale
> sensitivity has to pay for itself with the audience that won't use
> UTF-8.  Hmm.

Are you talking about programmers or users?  If it's programmers, then
you will not lose any Hebrew-speaking programmer.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!



Posted on the users mailing list.