Ask HN: “Best” Functional Language for the Web (key on Performance)

1 points by orph4nus ↗ HN
Hey. I'm planning on developing a free web game as a hobby project. The game will have quite a lot of calculations as it will rely heavily on fractal generation, pseudo variants and other forms of generation on the fly. But without going to much in details (as I'm still in the early prototyping phases) I would like to know what these days the best functional language for the web is?

I only ever do web development for hobby projects, as I'm a developer for personal computers and embedded systems in my professional time. I like to develop in Functional Languages as It fits best with how I think and come up with solutions for my problems. Besides one web project that I developed with Clojurescript I don't have much experience with functional languages for the web though. Which brings me to the question...

What functional languages do you recommend for the web? Clojurescript, Elixir, Erlang, or another one? Key elements I look for is completeness of libraries available and performance.

Thank you upfront.

10 comments

[ 2.7 ms ] story [ 32.9 ms ] thread
Erlang is not for computationally intensive stuff - but it could easily be used to control something that is, like a C program.
(comment deleted)
Oh i didn't think about the possibility about interfacing to a native compiled program. Interesting approach.
I like Scala because of the amount of Libraries, Concurrency Primitives available.

Algebird is one of my favorite projects of all time.

Fact that it supports mathematics so well is quite handy. Question is though, does it allow me to develop my game without people needing to download additional plugins?
Well, if you get the build process right. It takes some time for the setup, but I was able to Google it and get it right.

I use SBT, it works rather well, manages my dependencies right.

Oh sorry, I think we have a miscommunication. What i mean is, doesn't compile Scale to java? So doesn't that prevent people from playing the game in their html5-enabled browser in case they don't have a java plugin or sth similar?
The main problem that i had with Clojurescript was that it seemed to be quite intensive even for the simple puzzle game that I made. Note that it may be because I hacked the program in one night and probably raped the language horrible. Which is why I'm still open for Clojurescript suggestions by people who have good experiences using it.
I've been using it in production for a number of applications for about 6 months now and haven't seen any performance issues. Prismatic http://getprismatic.com/ and CircleCI https://circleci.com/ both use ClojureScript for their front-ends. CircleCI open sourced their front-end here https://github.com/circleci/frontend/tree/master/src-cljs/fr... as you can see it's a decent size app, and Prismatic have blogged about Om and performance here http://blog.getprismatic.com/om-sweet-om-high-functional-fro...

In general, there should be very little overhead compared to regular JavaScript once the advanced compilation option is used.