Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gordon Henriksen <gordonhenriksen@mac.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Why OCaml sucks [unicode]
Date: Wed, 14 May 2008 08:04:23 -0400	[thread overview]
Message-ID: <AC68A524-0216-4DF4-B893-8CA2F102D1E5@mac.com> (raw)
In-Reply-To: <2a1a1a0c0805132204m33659840k1f84eb59f93bd3e4@mail.gmail.com>

On May 14, 2008, at 01:04, Mike Lin wrote:

> Re: unicode support, anyone else who was around programming Win32  
> 5-10 years ago (before .NET) might join me in offering a wary word  
> of caution: the otherwise-disarming "let's just support both in one  
> runtime" philosophy can be taken too far. In the nightmare scenario  
> (which was reality until Windows 9x finally died an overdue death)  
> you end up with two versions of every library function that takes a  
> string. (This when we now have like 3 contenders for a standard  
> library and n GUI toolkit bindings!)

FWIW, this continues to be the reality. Win32 entry points that handle  
strings are declared as such:

BOOL DoFooW(...); // UTF-16 variant takes wchar_t. Always UTF-16.
BOOL DoFooA(...); // “ANSI” character set variant takes char. Could be  
UTF-8.

#ifdef _UNICODE
#  define DoFoo DoFooW
#else
#  define DoFoo DoFooA
#endif

Doubtless, the implementation in most cases transcodes the string in  
one variant and passes it to the other.

> I'll take a couple days to try to reason out more specifically about  
> how that got so out of control, but I just want to note that there  
> is a precedent for trying to have a sympatric speciation between  
> ASCII and unicode software and, while it was necessary for  
> historical reasons, it was pretty godawful to deal with!

— Gordon


      reply	other threads:[~2008-05-14 12:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  5:04 Mike Lin
2008-05-14 12:04 ` Gordon Henriksen [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AC68A524-0216-4DF4-B893-8CA2F102D1E5@mac.com \
    --to=gordonhenriksen@mac.com \
    --cc=caml-list@yquem.inria.fr \
    /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