[MLton-devel] Minamide's POPL '98 paper
Wed, 23 Apr 2003 20:52:34 -0400 (EDT)
> I am thinking about
> what kind of support we might add for this style of programming in
> MLton -- should we do an optimization or add a user-level library?
A user-level library would be nice, but I don't think that Standard ML
gives you a strong enough type-system to use it both correctly and
efficiently. You really need linearity in order to justify the
One possibility might be to make the fill function a runtime GC function,
like MLton.size, which would perform a depth-first copy of the
data-structure before updating the pointer. Like GC functions, it would
be type-independent, and presumably could be faster than the ML functions
that are built up.
In any event, I think that contexts like this are probably useful
constructs, both for optimizations as in the Minamide paper and also for
some other purposes. I had been looking some time ago at generalizations
of pattern matching, and one useful idea that I cam across was of being
able to capture contexts of "deep" pattern matches. For example, given a
data-structure for lambda-terms, one could define a pattern that matches
the next redex to be performed, while capturing the surrounding context,
so that plugging in the reduced redex was a simple function application.
In any event, it gave a pretty concise description of evaluation.
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
MLton-devel mailing list