
Why the Elixir language has great potential - jswny
http://adrian-philipp.com/post/why-elixir-has-great-potential
======
ryanbigg
I've been a long time Rubyist (10 years now) and I'm really enjoying Elixir.
What got me hooked was the simple syntax and wonderful documentation, both
from the project itself and in the Programming Elixir and Programming Phoenix
books.

The ease of navigating an Elixir project is a huge benefit. If I want to know
where a function is defined, it's very easy to find it. There's none of this
class-reopening or meta programming malarkey that you get in Ruby (where is a
Rails controller's render method defined exactly?)... it's all right there in
the module.

Another thing that I love is that it's trivial to separate processing of
several pieces of data into separate Elixir processes. To do something similar
in Ruby, I would probably need to either use concurrent-ruby or spin them off
into a background job with Sidekiq. In Elixir, it's baked right in.

Elixir is well-designed, the community is very friendly and it's just a
pleasure to develop in.

~~~
Lordarminius
> The ease of navigating an Elixir project is a huge benefit. If I want to
> know where a function is defined, it's very easy to find it. There's none of
> this class-reopening or meta programming malarkey that you get in Ruby
> (where is a Rails controller's render method defined exactly?)...

I would view Elixir as an improvement (iteration?) of Ruby built on Erlang.
The article points out it was written by Jose Valim . It derives its structure
from the documented shortcomings of both parent languages.

~~~
_d8fd
Other than some superficial syntax similarities, I find Elixir to be nothing
like Ruby. Pattern matching, immutability, OTP, and the actor model feel like
building blocks from a whole different universe.

------
innocentoldguy
I share the author's optimism. I work for a start-up, and we just released a
mobile app that uses Elixir on the back end. I'm the architect on the project,
and this was my first time using Elixir professionally. I've been blown away
by the speed and stability of the product, the ease of hot deployments, and
the intuitiveness of Elixir's syntax. Behaviors are amazing, and for the first
time in my career, concurrency isn't a huge pain in the ass. The codebase is
extremely easy to maintain and organize, and Elixir just takes baby sips at
our cluster's resources. Elixir has far exceeded my expectations, and has
provided me with one of the smoothest product launches of my 27-year career. I
cannot speak highly enough about it.

Regarding learning Elixir, I thought LearnElixir.tv was great, but wasn't
nearly as impressed by LearnPhoenix.tv. The latter is good, and definitely
worth the money, but it didn't feel like it went into nearly the depth and
breadth that LearnElixir.tv did. I also recommend the books "The Little Elixir
& OTP Guidebook," by Benjamin Tan Wei Han, and "Programming Elixir," by Dave
Thomas. Elixir School ([http://elixirschool.com](http://elixirschool.com)) is
great online resource, and the Hex docs
([https://hexdocs.pm](https://hexdocs.pm)) are clear and well organized.
Finally, "Take Off with Elixir" ([https://bigmachine.io/products/take-off-
with-elixir/](https://bigmachine.io/products/take-off-with-elixir/)) is a
great video/book offering.

~~~
samhamilton
Which package are you using for deployments?

~~~
innocentoldguy
Exrm.

~~~
brightball
Author of exrm rewrote it as Distillery and says that will be where all future
development goes.

~~~
innocentoldguy
You are correct. We will be updating our deployments within the next few
weeks.

------
kriro
I'm having a lot of fun with it, can't wait for winter vacation to build stuff
:)

There's a lot of niceties you get out of the box (mix is pretty nice and the
testing framework is included, the REPL is good, love that they improve the
error messages and consider an unclear error message a bug). I'm already used
to pattern matching from Prolog so that's a great plus (I wanted to use Erlang
initially but Elixir has won me over). I also feel like I'm thinking in a
functional way much clearer (I'm using the PragProg book and this video
tutorial [https://bigmachine.io/products/take-off-with-
elixir/](https://bigmachine.io/products/take-off-with-elixir/) which both
stress it, both resources highly recommended).

Once I start dipping into OTP I'm sure I won't be looking back anytime soon.
It's been a while since I was this excited about a language.

Phoenix (web framework) is also pretty awesome. The abstraction of chaining a
request through a bunch of functions to generate a response is very fitting.
Plugs make sense.

tl;dr: Try it!

------
TheAceOfHearts
Another one that wasn't mentioned: optional types. Sometimes you don't need /
want em, but it's good to have the option available for when you do.

Aside from that... Elixir feels really fun. Maybe it's a silly metric, but
that's just my biased opinion.

The last feature that caught my attention was their deployment tools. I
haven't used em yet, but based on a conference video I watched, it looks like
they have pretty sweet setup. They claim to have very easy zero downtime
upgrades / downgrades. And I think preparing a release automatically bundles
dependencies, so everything is contained in a single compressed file.

~~~
tie_
> Aside from that... Elixir feels really fun. Maybe it's a silly metric, but
> that's just my biased opinion.

I'd argue that from a hacker's perspective, this is the most important metric.
It's what keep you returning to the language, and what gives it vi(r|t)ality.
Don't underestimate fun!

------
minhajuddin
Elixir as a new language doesn't have to reinvent a lot of things because of
its ability to transparently call erlang (for instance, to use crypto I could
just do :crypto.strong_rand_bytes(32) |> :base64.encode_to_string ). This is
an awesome advantage to have.

------
kbuchanan
Coming from the Clojure world, every time I read about about Elixir, the
similarity of the two langauges' values always surprise me: immutability,
macros, dynamic and gradual typing, concurrency, and on.

I've yet to touch Elixir (or Erlang, for that matter). Does anyone have
experience using both? Thoughts? Has anyone crossed from one language to the
other over any strong preference?

~~~
ivank
I have used both (though Clojure less). I have not built distributed
applications in Elixir yet, so I do not focus on those features in this
comment. I prefer Elixir because:

1\. My brain thinks in terms of editing lines, not s-expressions; I didn't get
the hang of paredit, and editing without paredit required really tedious edit
operations.

2\. Elixir's understanding of types matches Erlang's and the host VM, while
Clojure invents its own uni-typed IObj but runs on a typed VM. Interop with
Java required adding type annotations. Elixir/Erlang interop seems to be
almost entirely pain-free.

3\. Elixir has a lot of syntax niceties like triple-quoted strings that
automatically remove indents. And pattern matching everywhere.

4\. I can feasibly (and in fact, have) audited and built all of my Elixir and
Erlang dependencies from git repositories, while doing the same with the Maven
dependencies needed for a typical Java project would be almost impossible. I
wouldn't even know where to begin with bootstrapping all the necessary Maven
plugins.

5\. Elixir/Erlang has per-process garbage collection and memory limits, though
I haven't taken advantage of these yet.

~~~
felideon
> My brain thinks in terms of editing lines, not s-expressions; I didn't get
> the hang of paredit, and editing without paredit required really tedious
> edit operations.

In my experience, learning and then working in Common Lisp, starting with
paredit is tough. I disabled paredit for a while until I got the hang of
thinking in s-expressions as you say. After a while when I tried paredit
again, it was glorious.

Early on I did set up % as a global key that goes to the matching parenthesis
if on parenthesis, and otherwise inserts the character typed.

Also, I hope you were setting
[https://www.emacswiki.org/emacs/ShowParenMode](https://www.emacswiki.org/emacs/ShowParenMode)

Just my 2¢.

~~~
kazinator
I use Vim for editing Lisp. Basic :set lisp mode that dates back to ancient
Unix implementations of vi and the % command for jumping between matching
parentheses. In Vim, selecting a range and typing = re-indents it, and ==
indents the current line. I set shiftwidth to 2. When I need to move the
indentation of a whole block I use select and < or >. Or << and >> for the
current line. With those basics, I comfortably do 95% of all Lisp editing.

For instance to move an expression: put cursor on one parenthesis, type v for
visual select, type % to jump to the other paren, then x to delete. Move
somewhere, p to paste. Adjust formatting here and there, done.

I edit C and other languages in pretty much exactly the same way.

------
d3ckard
Working with Elixir professionally for year and the half, having deployed more
than one app on production I can honestly say, that it's just awesome. Not a
silver bullet, will not solve your problems, but the way it makes you think is
great. It's been the most impactful and satisfying learning experience of my
short career.

------
IanCal
Last time I went to look at elixir it looked nice, is there an accepted user-
mangement system for phoenix yet? User auth is a combination of the three
things I least want to implement myself:

1\. Security. Small non-obvious mistakes are easy to make and very important.

2\. High visibility. Risky, and if it goes wrong it's a major thing your
customers notice.

3\. Dry. It's just not particularly interesting for me, it's certainly solved
in other frameworks (e.g. devise). I'm aware this last point is extremely
selfish of me, however.

~~~
BrianHV
Because of the points you mentioned, I've been wondering why I haven't been
able to find a framework-independent, open-source user management and
authentication system. This seems like the sort of thing that should be solved
in a standard way and not reinvented by every framework (or worse,
application) that needs user management.

I've come across some paid services (e.g., stormpath, auth0) that seem to do
what I'm talking about. It would be really nice if there were a free project
along those lines though.

~~~
awinder
The API gateway approach has a lot of the upsides you mention:

1\.
[http://microservices.io/patterns/apigateway.html](http://microservices.io/patterns/apigateway.html)
2\. [https://getkong.org/](https://getkong.org/) (a few auth plugins) 3\.
[https://github.com/auth0/nginx-jwt](https://github.com/auth0/nginx-jwt) /
[https://www.stavros.io/posts/writing-an-nginx-
authentication...](https://www.stavros.io/posts/writing-an-nginx-
authentication-module-in-lua/)

------
SamBoogieNYC
I've just recently started learning Elixir and have really been enjoying it.

Subjectively speaking, I really like the terse yet expressive syntax. It's
also nice to have a smaller codebase.

There's an awesome package that creates HTML docs out of your comments. It's
really useful for creating documentation on the fly. Elixir's official docs
are made this way.

I'm about halfway through a course I think is very good for beginner-level
programmers ([https://www.udemy.com/the-complete-elixir-and-phoenix-
bootca...](https://www.udemy.com/the-complete-elixir-and-phoenix-bootcamp-and-
tutorial/)).

Elixir School is also a good resource.

Phoenix shows a lot of promise too, I haven't taken to JS so it would be good
not to have to use it as much as possible.

~~~
andy_ppp
I really rate [https://elixirforum.com](https://elixirforum.com) although for
some reason Google never seems to find results on it even when there are lots
of relevant examples.

I signed up for the digest there and it's one of the few "bulk" emails I get
that I actually read.

~~~
SamBoogieNYC
thanks ill check it out!

------
andy_ppp
Here is a repost of a comment I made a while ago about why I love Elixir:

The thing that constantly gets me about Elixir and Phoenix is the default
tends to be the correct way of doing it. Let me explain.

For example, the other day, I was looking at filtering a next parameter to
remove the domain (for security- you could redirect someone to fake login box
on your host after they log in)... however it's unnecessary as redirect/2 in
phoenix if passed a URL rather than a path will throw an error by default. As
an aside different exceptions will return different HTTP error codes - for
example a database not found exception from Ecto will cause a 404. There are
hundreds or thousands of these little decisions that are the correct/simpler
decision.

Elixir and Phoenix, for want of a better way of saying it, show great
programming taste. So to say it's a coat of paint is a bit harsh; it's the
right coat of paint, in my opinion.

------
bharani_m
I am a self taught Ruby/Rails developer who has recently started dipping my
toes in the world of Elixir and Phoenix.

I am having a lot of fun as I find it to be a refreshing approach to web
development.

Elixir's guide is quite exhaustive. You can easily start building a toy app
over a weekend.

I have open sourced the source code for my blog/web-shop that I built using
Elixir/Phoenix. I am not an Elixir expert and this is not the best written
Elixir app, but if anyone wants to look at the code for a simple CMS and shop
built with Elixir and Phoenix, here is the link -
[https://github.com/authentic-pixels/ex-shop](https://github.com/authentic-
pixels/ex-shop).

Here is a link to the live website -
[https://www.authenticpixels.com/](https://www.authenticpixels.com/)

------
bsaul
Read the blog post and then the thread, and was really starting to get excited
at the prospect of using elixir. Then i wondered what was the pace of adopting
new technologies in elixir, and found this thread about http2 support (which
started to gain adoption last year, and increase peroformances a lot)

[https://github.com/elixir-lang/plug/issues/258](https://github.com/elixir-
lang/plug/issues/258)

So, for a language that's primarely based around webserver, i find it really
woorying that http2 support wasn't a primary concern, and depends on donation
to a third party developper...

I guess it means the language is still young and so is the ecosystem.

~~~
alberth
This isn't elixir fault per se.

Elixir leverages Cowboy quite a bit and HTTP2 requires substantial rewrite of
Cowboy.

This will be completed in the release of Cowboy 2.0

If you want to read why Cowboy needs to be majorly refactored, read the link
below

[https://ninenines.eu/talks/cowboy-2/#/](https://ninenines.eu/talks/cowboy-2/#/)

------
weixiyen
Just anecdotal evidence but I've been running Elixir in production for half a
year now for an app called Sleeperbot (95% of our backend is written in
Elixir)

Our websocket endpoints, our app servers, and other services all run on
Elixir, and pretty much without any incidents.

Erlang/OTP is battle-tested and it's really the first time I could comfortably
sleep at night without worrying about stuff going down. Personally I think
Elixir past the point of just having "potential" and is my default go-to
language to solve any problem as long as it makes sense to solve it with
Elixir.

~~~
chillee
Hey I don't personally use sleeperbot, but I play fantasy bball. "Is there a
basketball equivalent of sleeperbot?" is a very common question, so I assume
you're doing something right.

Just curious, what other languages/frameworks have you tried in backend? Are
you running Phoenix?

~~~
weixiyen
Next season there will be. It'll actually be a full fantasy platform that
hosts season-long leagues as well.

------
nnq
Has anyone used both Elixir and Go enough to give a comparison of the
feel/productivity for backend web dev?

(I know it's apples to oranges... but for some tasks, like backend / high
concurency microservices etc., both an apple and an orange are perfect fit, so
it's worth comparing. I've heard of Ruby or Python people jumping to Go or
Elixir, but not of any comparison.)

~~~
brightball
I'm actually in the process of writing a detailed blog post on that subject.
Just trying to make sure I cover all of the bases.

Both are very similar in their underlying approaches. The biggest difference
is that you have to write a lot more error handling code for Go.

The other thing is interfaces. With Go if you want to be able to pass multiple
different types of structs to a function you have to define an interface that
fits with both by showing each have a field named X of type Y. Because of that
you end up needing to define a lot of interfaces.

Elixir accomplishes the same thing with pattern matching. You can define a
function that shows parts of a nested hash in the argument and in order to
call that function the hash you pass has to have those keys. It's much more
flexible and less clunky IMO.

The other thing is Go's compiler strictness about making you remove any
library from the import that not in use. When doing development or
experimenting with a new library it gets really old having compiler yell at
you about this because you commented something out. With Elixir, the compiler
WARNS you about it. You still get a great big "get rid of all this stuff that
isn't used" on compile, but it doesn't interrupt your development workflow.

Details like that, better package management, etc make me significantly more
productive with Elixir. Phoenix is excellent and it's view layer is extremely
fast and flexible - probably my favorite view layer that I've ever dealt with
across many languages. Contrast that with Go templates, which to me felt a lot
more like JSP.

------
agentgt
The big reason I won't use Elixir is there are similar and arguably better
options on the JVM. The whole Server B column in the article can easily be
replaced with JVM instead of Erlang.

For example you could use JRuby and Akka and probably have something
comparable to Elixir (I haven't tried it as I prefer Java and Scala). And you
could then use any Scala or Java library.

The only big issue I have with the JVM is that it is a memory hog and thus
expensive. Consequently the most compelling thing about Elixir is that is on
the erlang vm but I still prefer static typed languages. If Elixir were typed
I might be more excited about it.

Don't get me wrong I love more options and we even use Erlang in my company
but the JVM just has more flexibility.

~~~
rad_gruchalski
I have written apps in both Scala Akka and Erlang / Elixir. You can't directly
compare JRuby + Akka vs Elixir. The former is just an insane stack. Akka is
plain ugly in Java and gets you nowhere near the simplicity of Elixir /
Erlang. Elixir isn't emulating Ruby, the syntax is based on Ruby. That's it. I
also do not find Akka as pleasant to work with as Erlang / Elixir.

Regarding the types on BEAM, there are types: maps, records, binaries, atoms,
numbers, booleans... there's no classes but one does not need classes. Actors
replace objects perfectly fine.

~~~
agentgt
I agree that Akka is ugly (my company doesn't even use it) and I totally agree
that you don't need classes (and you don't really have to in Scala and
Clojure... even in Java you can just uses classes as though they were
structs).

I only mention JRuby as many folks switching from Elixir are Ruby shops.

Personally I find the actor model too heavy (programming wise) for local
concurrency and rather use some other message passing for distributed
programming (zeromq, rabbitmq, kafka, etc). I know people hate damn queues and
reactive programming but that is what I know (and I admit it is less efficient
and more error prone than builtin green threads (go) or actors).

I realize now Elixir makes it damn easy because it is all in one package it is
just a shame that there isn't some ML like language that compiles to Erlang
bytecode.

~~~
ramchip
> it is just a shame that there isn't some ML like language that compiles to
> Erlang bytecode.

There is! [https://github.com/alpaca-lang/alpaca](https://github.com/alpaca-
lang/alpaca)

It's very new, though. I wouldn't write production stuff in it just yet.

------
peterbonney
We're using Elixir for the back-end of our web application, and so far I'm
very happy with it.

Probably the biggest issue we have with Elixir right now is libraries, but
it's a more subtle problem than "there isn't a library that for this thing I
want to do". To the contrary, I've been pleasantly surprised at how many
libraries are available and how good they are.

The issue with libraries that _I_ see is that because the language is so young
and the core libraries are changing so rapidly (for the better!) a lot of
useful third-party libraries have trouble keeping up. So we frequently find
that a new feature has been rolled out to a core library that we really want
to use, but upgrading it breaks a dependency in a third-party library.

It's sort of to be expected, right? The language has captured enough mindshare
that people are building useful libraries left and right, but it hasn't gained
quite enough adoption that there are armies of developers who can devote time
to keeping those libraries updated to the minute - you don't have 100
developers behind a given library, you have 10 or 2 or 1.

------
ericdykstra
Programming languages, being technologies, are subject to the Lindy effect
([https://en.wikipedia.org/wiki/Lindy_effect](https://en.wikipedia.org/wiki/Lindy_effect)).
This means that the younger a language is, the lower its life expectancy. This
is why the neomania in JavaScript framework land is so chaotic. Even if a
_better_ framework emerges and takes off in popularity over a few months, it's
unlikely to last in the mainstream for another year. When I'm choosing
something to study programming-wise, I use this heuristic as part of the
decision-making process. For example, studying algorithms and data structures
is more robust than studying Vue.js or GraphQL, which are not likely to be
around in a few years.

Elixir was just released 5 years ago, and despite some success, has not taken
off as much as the absolute top programming languages released around that
time. For example, Go, released just 2 years earlier, is by far the most
successful of new languages from the last 10 years.

Given my skeptical mindset towards neomania, it might surprise you to hear
that I'm a huge proponent of Elixir! Here are my reasons for studying Elixir
and using it exclusively for my non-work projects, despite there being
countless other recent, appealing languages:

\- Although the language is young, it's built on Erlang, which is 30 years
old. Even if Elixir fails, there is a lot of knowledge transfer between the
two languages (probably 90% of what I learn from using Elixir transfers
directly over even if I switch to exclusively Erlang).

\- Web applications are a fantastic use case for the Erlang VM (BEAM). Take a
look at this article ([https://joearms.github.io/2016/03/13/Managing-two-
million-we...](https://joearms.github.io/2016/03/13/Managing-two-million-
webservers.html)) by Joe Armstrong, one of the creators of Erlang, written
earlier this year.

\- Elixir is quite a bit different from other languages I'm familiar with.
It's compiled and functional, has powerful pattern matching, uses lightweight
processes and the actor model, and comes with OTP, a complete set of tools
that I can use for free. This means even if/when the language dies, I've added
a lot of new skills to my programming toolbelt.

To anyone that has decided, like I have, that Elixir is worth putting some
time into learning, I'd like to recommend the book _Elixir in Action_
([https://www.manning.com/books/elixir-in-
action](https://www.manning.com/books/elixir-in-action)) and the blog of the
author of that book, which has infrequent but outstanding posts
([http://theerlangelist.com/](http://theerlangelist.com/)).

~~~
biokoda
> Erlang has this sort of huge cognitive overload with it's syntax, making it
> take longer to learn, for no obvious benefits.

Actually the adoption is quite good considering there is no industry giant
backing it. There are plenty of companies using it in production and there is
a job market for it.

Comparing the adoption with Go/Swift is a bit unfair.

~~~
pjmlp
Putting aside how the whole relationship with Ericsson allows to sell it to
management.

------
the_duke
The biggest problem with Elixir imo are the horrible error messages.

Especially around using macros, but also other lexing errors like missing
closing delimiters, ...

Line numbers are often non-existant or wrong, and the terminal output is hard
to read.

Devs should take some inspiration from Rust. Wonderful error messages, and
mostly accurate line numbers even in expanded macros.

Otherwise, Elixir is definitely interesting though.

~~~
jswny
Interesting, I've never come across a situation in which the line numbers in
the error message were incorrect.

------
thejosh
I'm also a huge fan, been using it for 6 months. 0.2s for my entire testsuite
that touch the database are amazing.

------
jaequery
Elixir is definitely interesting and one to keep an eye on. But I'd guess that
for startups to use this, is still very risky especially at this stage. You
may likely run into scenarios where you need some library/package and you
can't find one for it and that could be a potential deal breaker for some
startups.

I'm interested to hear though, can anyone care to comment on their experiences
with Elixir's package ecosystem? How much developed is it and/or how much more
to go to be suitable for most major projects?

~~~
ryanbigg
I think that the package ecosystem is well developed, and getting better every
day. For the most common things, there's already packages out there. You want
to talk to a database? Use Ecto. You want to check code quality? Use Credo.
You want to respond using JSONAPI? Use ja_serializer. You want to talk over
HTTP to something? Well there's two main options out there (HTTPotion and
HTTPoison).

If you can't find a package then you could try looking it up at
[https://github.com/h4cc/awesome-elixir](https://github.com/h4cc/awesome-
elixir) or asking on the elixir slack ([https://elixir-
slackin.herokuapp.com/](https://elixir-slackin.herokuapp.com/)) or on the
#elixir-lang channel on Freenode.

After all that if you can't find a package that suits your needs then it's
very easy to create one. "mix new (your project)" and away you go.

That's what I did with my elastic package
([https://github.com/radar/elastic](https://github.com/radar/elastic)) when I
couldn't quite find something that suited my exact needs. There's Elastix and
Tirexs out there (those are the ones I know of) but neither really suited what
I needed, so I just built my own.

I don't know how it could be a deal breaker if a package didn't exist already.
I'd encourage you to build whatever you don't find already existing and
contribute back to the community.

~~~
bpicolo
Man, there are things I like about Ecto but for anything beyond simple selects
the documentation is lacking and the experience is kind of painful.

As an example, I hit the issue recently where a changeset wouldn't accept nil
for a relation via put_assoc. That seemed like an very trivial problem to be
hitting for a project that's been around so long. And I hit a number of issues
that had that sort of feeling.

Another thing was that, if you update a thing with new relation data, you have
to force-reload the relationships from the database again. That was pretty
surprising and seemed like it should be unnecessary.

I think there's room for an Ecto alternative that tries to be a bit less fancy
and gains a lot because of it.

------
anondon
Adding to the list: macros.

------
kbuechl
I've heard great things about it and currently have both of those books under
my Christmas tree. One discussion I have had often recently is the split in
the web community that appears to be emerging. Around (Less than in my
opinion) half of the community seems to be going the way of full oo while the
rest are going fp. Personally I feel fp is the right direction and will
quickly become the new hot item

~~~
tyurok
You'll find that Elixir/Erlang is a mix of FP and OO at the end, which is why
I find it amazing. While people debate FP vs OO, it takes the good parts of
both. You can read more about the OO aspects of Erlang from the author
himself: [http://tech.noredink.com/post/142689001488/the-most-
object-o...](http://tech.noredink.com/post/142689001488/the-most-object-
oriented-language)

~~~
kbuechl
Thanks for the reply! That is a good point. I guess my original intent was
strict oo (ex: typescript) that takes away the quazi FP properties js has.
Very excited for elixer though

------
conradfr
It's great to see another PHP/Js developer enthusiastic about Elixir. Usually
it seems PHP devs pick Go as their next stack / interest.

The Ruby-inspired syntax have helped the language to gain traction amongst
Rails developers but for somebody like me who only exposure to Ruby is
Capistrano it doesn't do much.

------
salex89
I have not used Erlang or Elixir, and wanted to start with Elixir (I want some
experience with a functional language, I'm to biased with Java to use Scala as
a functional language). However, I read somewhere that Elixir can be
successfully used only with Phoenix if you don't know Erlang. As I understood,
sooner than later interactions with Erlang libraries is needed, and that
requires Erlang knowledge. Can somebody please confirm? That Elixir is
basically oriented around Phoenix and Erlang is a requirement?

~~~
bitwalker
I'm not sure who told you that, but it's patently false. Phoenix is just
another OTP application, you can build a Phoenix app without knowing Erlang at
all. It is a practical reality that you will eventually dig into Erlang to
some degree, but I wouldn't say it's a requirement by any means. Perhaps what
was meant is that you will need to understand OTP, the Erlang standard library
(because Elixir avoids wrapping it as much as possible), and some of the
semantics of Erlang interop such as the binaries vs charlists, the use of
records instead of structs, etc. For just getting started though, much of that
can be avoided, and you can tackle it as the need arises.

~~~
salex89
Thanks. I'm not sure where I read, it was probably some article or comment
here on HN. That's what I wanted to hear, it is possible to attend to those
issues on-the-fly.

------
da02
I remember reading Phoenix had templating (eg HTML). Is Erlang/Elixir good for
this? Or is it something better suited for NIF?

~~~
strange_aeons
Phoenix uses IO lists for very efficient templating.

Read more here [https://www.bignerdranch.com/blog/elixir-and-io-lists-
part-1...](https://www.bignerdranch.com/blog/elixir-and-io-lists-
part-1-building-output-efficiently/) and in part 2.

~~~
da02
Thanks. This helps a lot even though I don't use Elixir or Erlang.

------
lenkite
Does Elixir even support step through debugging ? This is a necessity for a
production language.

------
coldcode
What is the relationship between Elixir and Erlang? I had thought Eixir was a
framework?

~~~
juandazapata
Elixir is a programming language that compiles to Erlang bytecode and runs on
the BEAM with no performance penalty.

------
owebmaster
How does it compares to Java and C in performance?

~~~
tim333
For math type benchmarks of the order of 2-10x slower
[http://benchmarksgame.alioth.debian.org/u64q/erlang.html](http://benchmarksgame.alioth.debian.org/u64q/erlang.html)

For this web framework test Phoenix (Elixir) does almost as well as Play
(Java) [https://github.com/mroth/phoenix-
showdown](https://github.com/mroth/phoenix-showdown)

The benchmarksgame's site quotes "Most (all?) large systems developed using
Erlang make heavy use of C for low-level code, leaving Erlang to manage the
parts which tend to be complex in other languages, like controlling systems
spread across several machines and implementing complex protocol logic."

So it depends I guess.

~~~
owebmaster
Thanks Tim, this is exactly what I was looking for. It seems to be no big draw
to use elixir to web development compared to java and C.

------
andrewvijay
Found the great site exercism.io from this article. Thanks to Adrian for
posting about it !

