From: Steve Knight
Subject: Re: Virtues of ML syntax
Date: 
Message-ID: <1350031@otter.hpl.hp.com>
Cliff wonders:
> I find ML syntax to be incredibly 
> unreadable, while Scheme & C syntax isn't that bad.  [...]
> 1) Not enough experience with ML,

Nope -- the more you use it, the more you hate it.

> 2) the difficultly of having a type system in a function language,

Nope -- the type system is a pain, but that's got nothing to do with the
syntax.  It's easy to write a ML-style type-checker for S-expression syntax
languages.

> 3) lousy design of ML syntax or

Alas, it is true.  ML's syntax is riddled with problems - the lack of a
closing keyword for IF means that you are left guessing how it binds with
respect to (for example) a HANDLE statement.  The overloading of END means 
that you are frequently left guessing, or measuring indentation with a ruler,
to work out what closes with what.  The fact that datatype constructors are
tupled rather than curried (as in Miranda) means that pattern matching 
involves many superfluous brackets.  The incorrect precedence for FN almost
always forces the insertion of disambiguating brackets.  The failure to
properly distinguish variable namespaces from constructor namespaces 
(as is done correctly in Prolog) means that it is trivial to write
incorrect programs ..... and so on.

As an example of this last point, I will leave you with a rather uncomfortable
observation about ML.  Taking this definition in isolation out of a program,
you cannot determine what it means because the context is too important.
    fun f x = x;
(Get it?  "x" might be a constructor or a variable.  You don't know.)

> Gratefully awaiting your enlightened responses,

Sorryfully, I have to say that ML is one of the few languages that makes me
wish I was using S-expression syntax.  Now stop that sniggering at the back... 

Steve