4 ms·
You can use many of the functional programming constructs like piping, (pretty limited) pattern matching, function composition, etc. with livescript [1]. Its tr
by fuzzythinker 11y ago
You can use many of the functional programming constructs like piping, (pretty limited) pattern matching, function composition, etc. with livescript [1]. Its translated js code is as readable as one coffeescript produces.
Or, if you really like elixir and don't mind its alpha status, you can look into elixirscript [2]. He gave a talk [3] in the conf.
Elm [4] is another alternative, but it wants to not just replace js, but html as well, with its very unique and useful "time travel" feature.
Alan gave a talk in usage with Phoenix [5].
[1] http://livescript.net http://livescript.net
[2] https://github.com/bryanjos/elixirscript/blob/master/FAQ.md https://github.com/bryanjos/elixirscript/blob/master/FAQ.md
[3] http://confreaks.tv/videos/elixirconf2015-elixir-in-the-browser http://confreaks.tv/videos/elixirconf2015-elixir-in-the-brow...
[4] http://elm-lang.org/ http://elm-lang.org/
[5] http://confreaks.tv/videos/elixirconf2015-phoenix-with-elm http://confreaks.tv/videos/elixirconf2015-phoenix-with-elm
- adambrod 11y agoOh wow Livescript snuck past me. However I don't care for the bracket-less syntax. For some reason, it's always hard to read quickly. I think this is why I never could get behind Elm. ElixirScript looks like it will be nice in time, although seems a bit awkward to use with JS libs. Can't wait to see how that matures! I've been tinkering with an old language project RedScript to make it more functional (Elixir like). Just a toy though: https://github.com/AdamBrodzinski/redscript https://github.com/AdamBrodzinski/redscript
- fuzzythinker 11y agoThe parans-less is optional, so you can always include them. Redscript seems very elixir like. Now that elixirscript is out, do you see any advance of it over elixirscript? Such as smaller output source or more readable output source. Have you used it yourself in a medium to large size project?
- adambrod 11y agoI think ElixirScript has more legs. RedScript was just a project I tinkered with 2 years ago and recently refreshed it post ES6 era and after getting into 'functiona' programming. RedScript is more like CoffeeScript and ElixirScript is more like Elm/ClojureScript IMHO. It has little to no overhead overhead after transpiling however 2.0 will use seamless-immutable (via CommonJS) to help with copying data. Here's the 1.0 before/after conversions: https://github.com/AdamBrodzinski/RedScript/blob/master/spec.md https://github.com/AdamBrodzinski/RedScript/blob/master/spec... It still needs a proper compiler, this is basically using RegEx to match/replace (it was a project to learn RegEx). It's surprising how far it takes you. I've built a small web app with it and it works well. I don't trust the compiled output without testing though (due to the RegEx strategy). I haven't had to the time to make the changes in the complier but shouldn't take more than a few beers and a weekend :)
- cpursley 11y agoThe RedScript syntax looks really great. Also, +1 for LiveScript. It's a powerful little language when combined with prelude: http://learnxinyminutes.com/docs/livescript/ http://learnxinyminutes.com/docs/livescript/ http://livescript.net/blog/10-things-you-didnt-know-livescript-can-do.html http://livescript.net/blog/10-things-you-didnt-know-livescri...
- adambrod 11y agoThanks! I'll check those out.