[MLton-devel] basis-2002: IO
Stephen Weeks
MLton@mlton.org
Fri, 18 Oct 2002 11:22:45 -0700
> Looking back at the BinOrTextIO functor, I see that it's very similar to
> what is done in the PolyML sources. That is, use an imperative buffer,
> but if getInstream is called on the instream, turn it into a
> StreamIO.instream. We ought to be able to do the same thing here, but
> building on the StreamIO functor to get the remaining functions.
> Unfortunately, my StreamIO isn't as fast as the StreamIO produced by the
> BinOrTextIO functor.
That's OK with me. It's not nearly as important (to me) for StreamIO
to be fast. And, I suspect that with some work the new StreamIO can
be made almost as fast as the old one.
> There are two structures matching the CHAR signature. The Char structure
> provides the extended ASCII 8-bit character set and locale-independent
> operations on them. For this structure, Char.maxOrd = 255.
...
> This is probably archaism in the Basis spec, but Char.char needs to be an
> 8 bit entity.
Once we confirm this is not an error in the spec, we can go ahead and
merge Word8.word and char. Although I don't see it as very important.
> Again, it depends on what "level" of backwards compatibility we're
> looking for. I could (easily) create a BASIS_1997 signature and a
> Basis1997 structure that opens Basis2002 and wraps functions whose
> types have changed (Array and Vector functions, OS.FileSys.readDir,
> etc.)
Great.
> That should allow most programs to type-check and compile, but it
> won't take care of functions whose semantics have changed.
> Likewise, we won't be able to recover the non-opaque signature
> matches. The major semantic change that I've noticed is that
> Time.time admits negative values, so Time.- doesn't raise Time as
> often as it did before. (In particular, all our problems with
> Time.now () going backwards wouldn't raise an exception, although
> we'd get strange results.)
I don't mind about the non-opaque stuff. MLton doesn't check it
anyways. As to Time, we can just leave around both implementations.
And do wrappers every where else.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel