[MLton] improved overloading for SML
Stephen Weeks
MLton@mlton.org
Mon, 17 Oct 2005 22:29:58 -0700
> Have you thought about building this directly into the compiler?
Nah, I tend to focus on things that can be done with SML as it
currently stands.
> which seems to me simpler and easier to use -- and implement -- than
> using 'phantom objects'. I call them that because in your code the
> 'phantom types' are what are interesting, and the non-type terms are
> irrelevant carriers.
I wouldn't say irrelevant. In fact, the non-type terms are what the
code uses to decide how to dispatch. It's just that the types cause
MLton to do enough duplication that all the (value) dispatching can be
simplified away at compile time.