Re: [MLton] RFC: implement "use" function to support explicit file dependency

Florian Weimer <[email protected]> Wed, 05 Feb 2014 08:23:48 +0100
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
* James Deng:

> Here I propose to add implementation of the optional “use” function
> in the ML basis library, to support explicit file dependencies. To
> avoid problems, the string argument of “val use: string -> unit” can
> be restricted to compile-time constants.

You cannot "use" the same file twice because most of the time, the
results will be unexpected.  It would need something like C #include
guards or #pragma once.  Without that, I'm not sure if "use" would be
all that helpful because you'd still be inclined to move the "use" out
of the source file that needs the definitions in the used file.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
MLton-devel mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-devel