a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by xash
xash  ·  3456 days ago  ·  link  ·    ·  parent  ·  post: What's your favorite alternative language to javascript and why?

Elm. It is very different to JavaScript, as it is a functional reactive language, but it compiles down to JS, can interact with it and is quite powerful. Check out some examples to see the syntax. As objects are immutable, you describe everything as-it-is, instead of how-it-changes. That means, once you get the functional way of programming, you will have way less headaches with coding and debugging.





Magnnus  ·  3456 days ago  ·  link  ·  

This looks fantastic. Very similar to Haskell. I've always liked Haskell, but it doesn't have the library support for most of my work. Looks like I can use Elm for my front-end scripting.

How well supported is it, and can it easily interface with native javascript?

naaktman  ·  3451 days ago  ·  link  ·  

> How well supported is it

Elm is created almost solely by Evan Czaplicki, there are some other contributors but for the most part it looks like a one-man-show. FWIW he does seem to be very responsive, and the mailing list is full of people who'll help.

> can it easily interface with native javascript?

There is a "port" mechanism, it is described here: https://github.com/evancz/elm-html-and-js

psudo  ·  3451 days ago  ·  link  ·  

You can also check out Scala.js. It gives you access to a very mature mostly functional language as well as several of it's biggest and most popular libraries.