[MLton] WideChar?

Matthew Fluet fluet@cs.cornell.edu
Tue, 7 Dec 2004 08:55:16 -0500 (EST)

> I thought MLton had WideChar support, but it seems that it does not.

Correct.  And, MLton has never supported WideChar.

> Is there a reason this hasn't already been added using Word16/32?

The usual: lack of time, lack of requests, lack of expertise.

> Also, why does the SML Basis Library call it 'WideChar'?
> There are two kinds of 'WideChar': UCS-2 and UCS-4.

In responding to some similar questions, John Reppy (co-editor of the
Basis Library) wrote:

  The lack of support for Wide characters, Unicode, etc., is owed to the
  fact that none of the Basis designers felt competent to design such
  facilities (localization is another, related, issue).

Also, my (limited) understanding of Unicode and related 'things' suggests
that it isn't as easy as identifying Word16 and Word32 with corresponding
character structures; that, variable length encodings, etc. make things
more difficult.

> Not providing a LargeChar also makes it ackward to pick the biggest
> available char type in a portable way. Grumble grumble.

This objection has been raised by others.

> I take it there aren't many internationalized SML programs.

Unfortunately, that statement is true for pretty much any adjective.