23 November 2008

Amused by SMLtoJs

I love Standard ML -- its excellent type system finds nearly all of my bugs before I run the code even once, and the idea of restricting side-effects to a small portion of my code makes the whole easier to reason about. Not to mention, disjoint union types seem to cover 99% of my previous use of object oriented programming. Runtime performance sucks, but honestly, how frequently does that even matter?

I hate javascript, even more than I hate perl. It is a language with no definition. It is a language with no reference implementation---and even individual implementations are self-inconsistent. It's a classic example: very little planning went into its beginnings, and the remaining planning only came about after every vendor had pushed their own solutions.

I recently discovered SMLtoJs -- a compiler that translates Standard ML into Javascript. I can't decide if I'm disgusted or pleased by this. I'm definitely amused...

1 comment:

Anonymous said...

Hates perl and Javascript. Wow, if I weren't already married and straight, I'd be all over you.

Not sure I agree about there being no standard Javascript though. There's plenty of them. As they say, "That's the great thing about standards -- there are so many of them".