[MLton] filedes = int (was: Stack size?)

Wesley W. Terpstra wesley@terpstra.ca
Tue, 12 Jul 2005 12:16:34 +0200


On Mon, Jul 11, 2005 at 01:49:34PM -0700, Stephen Weeks wrote:
> 
> > Now that there is a complete front-end, we could acheive the same by
> > 
> > -	datatype file_desc = FD of int
> > +	structure FD :> sig type t end = struct type file_desc = int end
> > +	type file_desc = FD.t
> 
> I like this solution, and it is used in other places in the basis
> library.  I'm tempted to make the change.

Since this saves me work, I'm all for it! ;-)

> > Though I think there is still some advantage (though I'm hard
> > pressed to put my finger on exactly what the advantage is) to
> > requiring explicit pack and unpack functions to witness the
> > coercion.

If MLton in the future needed to carry additional information with file
descriptors, then the (un)pack methods make more sense.

-- 
Wesley W. Terpstra