I'm looking for a transpiler that produces javascript that is directly runnable in a browser, that interops cleanly with javascript, without additional runtime requirements. At the very least I'm looking for a language that does list comprehensions, string interpolatino and dictionary iteration; more is welcome.

I've tried nearly all options listed on https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js, and I've spent about two weeks googling, but all that I've found have some combination of these problems:

  • Whitespace-sensitive block scoping (coffeescript et al)
  • Not actively maintained
  • Incomplete/experimental
  • Interop is clunky
  • Additional runtime needs to be loaded for the generated JS to work (traceur for example)

Initially coffeescript ticked all the boxes, but I don't like its var scoping, and personally I think the siginificant whitespace works everywhere except for closures, which I happen to use a lot. I realize this is a matter of preference, but my preference goes the other way. I'm open to pretty much any other syntax -- after trying to like coffeescript for a few weeks, I finally tried to get up to speed with lisp, but could not find one of those either that didn't hit on one of the above problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.