Elixir vs. Java, Ruby, and PHP - Seeking case studies or an interview with a community member

Eh, don’t be that hard on Java:

  • The types help ensure your program is correct, which cannot be said about Elixir (though java does not go far enough, everything can be cast to an Object like you can to void* in C, blehg)
  • Tomcat is indeed hell, but don’t use it, there are much better server containers for java programs than Tomcat.

Java7 is actually much faster than before and you can make good software in it now without fighting with it too much. However Joomla and Wordpress are both ‘old PHP’ things that are not made well. And with PHP it is easier to have security problems, but with enough discipline those are minimized (however yes, there are still lots of security issues with PHP, PHP7 closed more of those thankfully). It’s still faster than Ruby/Rails though. :wink:

More secure by default is great yeah, but using PHP frameworks you get a lot of that too (if you tried to, say, re-implement Rails on Ruby you’d probably have a lot of security issues as well), but even by default Rails has a lot of security issues that are easy to fall in to unless you know to avoid them. Also Ruby/Rails is a lot slower than Groovy (no clue about Grails), and tomcat you should avoid anyway.

You get this with about any language with any decent IDE, and many languages, like Rust, do the same built-in. I think the biggest advantage of Elixir is it is built on the BEAM and instead of entirely ignoring its heritage it instead embraces it, which helps people to write proper code the first time instead of trying to figure it out (great docs for the BEAM!).

Also people need to quit saying that Facebook is using PHP, because they are not. :wink:
They are using HHVM, which is PHP-like in syntax, but it has types (whoo) and is much faster and has a different API and more and more. You can run PHP on it as well (and it is still faster than normal PHP) but it is not taking full advantage of its enhanced API and without putting the Types in the source it will not run as fast as it possibly can anyway. Facebook uses HHVM, they don’t use PHP anywhere anymore.

3 Likes