
Ask HN: “Best” Functional Language for the Web (key on Performance) - orph4nus
Hey. I&#x27;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&#x27;m still in the early prototyping phases) I would like to know what these days the best functional language for the web is?<p>I only ever do web development for hobby projects, as I&#x27;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&#x27;t have much experience with functional languages for the web though. Which brings me to the question...<p>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.<p>Thank you upfront.
======
orph4nus
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.

~~~
yogthos
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/](http://getprismatic.com/) and CircleCI
[https://circleci.com/](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...](https://github.com/circleci/frontend/tree/master/src-
cljs/frontend) 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...](http://blog.getprismatic.com/om-sweet-om-high-
functional-frontend-engineering-with-clojurescript-and-react/)

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

------
user1241320
I'm surprised nobody mentioned elm*

*[http://elm-lang.org](http://elm-lang.org)

------
davidw
Erlang is not for computationally intensive stuff - but it could easily be
used to control something that is, like a C program.

~~~
orph4nus
Oh i didn't think about the possibility about interfacing to a native compiled
program. Interesting approach.

------
guilt
I like Scala because of the amount of Libraries, Concurrency Primitives
available.

Algebird is one of my favorite projects of all time.

~~~
orph4nus
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?

~~~
guilt
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.

~~~
orph4nus
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?

