[MLton] Ad-hoc infix identifiers, Printf, and libraries
Wesley W. Terpstra
wesley@terpstra.ca
Thu, 14 Jul 2005 14:55:51 +0200
On Thu, Jul 14, 2005 at 02:13:11AM +0300, Vesa Karvonen wrote:
> http://groups.google.fi/groups?hl=fi&lr=&th=2466da2429f0bd31&seekm=db10kn%24aaa%241%40oravannahka.helsinki.fi&frame=off
I really like this!
I've already plugged it into my own projects.
Matthew already said this, and I agree: supporting '.' for infixes is great!
One comment: they don't play well with 'o' or ':='.
The problem is that those have infix 3, and < = > ... are infix 4.
Ideally, I think your infixes should be 3.5 ;-)
That way 'Word8.fromInt o Char.ord o s <\ String.sub' works.
Also, 'x := s <\ String.sub' and 'x := s <\String.sub\> i' work.
For myself, I just changed 'o' and ':=' to 1, and your ops to 2&3.
However, that's not going to play well with other code. =(
--
Wesley W. Terpstra