Functional languages targeting JavaScript

If you are still not convinced about using JavaScript as a functional language, but enjoys the environment it provides and/or needs to do web or server development with it, then there are several alternative languages that encourages functional programming better than JavaScript and compile to it. You may think, if it compiles to JavaScript, why not writing JavaScript? Because languages provide abstractions to make problem solving easier. This would be the same thing about arguing about writing Assembly because "languages compile to it". There are almost as many languages that compile to JavaScript as there are JavaScript frameworks and libraries.


CoffeeScript is for Ruby as LiveScript is for Haskell. LiveScript is a functional language with strong roots on Haskell and F# with dynamic type checking that compiles to pure and mappable JavaScript. It's very useful for prototyping and data transformation. It provides a standard library called prelude-ls with lots of functions to handle lists, objects and other data structures with focus on composition and immutability, but still allows everything that JavaScript does, such as loops and random effects (not that you should use them). LiveScript is a fork of Coco language, an indirect dialect of CoffeeScript, but it is a lot more expressive. It also provides source-maps to allow debugging on VSCode, Chrome or Firefox without headache or suffering.

results matching ""

    No results matching ""