[MLton] Hmmm.... ML

skaller skaller at users.sourceforge.net
Sat Oct 21 19:59:35 PDT 2006


On Sat, 2006-10-21 at 19:28 -0700, Daniel C. Wang wrote:
> If you wanted me to ship something today, I'd use F#, C#, or Ocaml in 
> that order of preference.

If your clients run Linux or OSX, F# and C# are out of the
question. That leaves Ocaml.

> However, if you wanted for my system to be a reference that will live 
> around for several years and has to be understood by the widest set of 
> people, I'd choose SML.

I suspect more people know and use Ocaml than SML. I've never
even heard of an actual SML user (except on this list of course!)

> The Ecmascript stuff is all about avoiding writing some hairy spec of 
> the language and replacing it with code. I.e. it's meant mainly to be 
> read and understood. It's a nice and important side effect that you can 
> actually compile and run it.

The fact people can compile and run language X is WHY 
they can understand it!

For example I know Ocaml reasonably well but I've
never written a line of SML. Why? Because I don't
have a working compiler.

I once tried to build SML/NJ but it was hopeless
and I gave up (this is 10 years ago, on a 16 bit
machine .. :)

I don't really know Haskell .. why? Because it isn't
as well ported as Ocaml and I had to choose Ocaml
over it since my product requires a high level translator
which works on all popular platforms 'out of the box'.
(at the time, including Windows .. and I don't mean
Cygwin .. and now, also including OSX).

Now I've learned a bit more Haskell .. since I've implemented
typeclass support in Felix. Again, what I learned I learned
by DOING .. not reading some specification.

So I would argue -- that 'side effect' of being able to
actually compile and run something is actually critical,
much more so than the existence of a Standards document
describing the language.

Such documents are primarily for compiler implementors,
library builders, and programmers worrying about corner
cases of the language -- and they're likely to fall back
on the document only if they really have to.

For example most people .. including C++ standards people --
will ask g++ what a questionable construction means long
before resorting to reading the C++ Standard.

So if you're writing a spec .. there's nothing like allowing
your users to USE the spec by executing it .. and that
is *Particularly* the case for you, the specification
writer, to test that the spec if correct.

In fact many standards are virtually given this way:
typically Unicode standards come with reference implementations.

BTW: I'm not disagreeing with you, so much as pointing
out that the 'side-effect' is more important than you indicate
because it is part of the feedback loop that is vital to
human learning and thus comprehension.

ML may be more stable, but Ocaml will still win if it
has significantly more users.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net




More information about the MLton mailing list