[MLton-user] The SML basis library socket module

Matthew Fluet fluet@cs.cornell.edu
Tue, 30 Sep 2003 07:55:27 -0400 (EDT)


> > You mean the different basis library implementations are not
> > interchangable across the various SML compilers?
>
> Right, due to bugs, moving targets, and freedoms allowed by the
> specification.

Even more importantly, the implementations are not interchangeable because
they depend on compiler specific implementation details.  For example,
MLton and SML/NJ have different interfaces to C, so many of the C calls
underlying the low-level basis library functions (e.g., the socket stuff),
need to be different in the different compilers.  Likewise, the primitives
for manipulating arrays and vectors are different (they depend on the
layout of header words, interaction with the garbage collectors, etc.), so
can't be interchanged.

Certainly some modules, for example List and ListPair, would almost
certainly be interchangeable, but that's probably about it.