by qaq · 8y ago · 0 comments
Languages like Go, Rust, and Haskell have to start from scratch. Getting to the point where they work at all is a huge achievement (though of course they do more than that).
Languages like Clojure run on an existing virtual machine, but want a very different programming model, so they have to invent a lot.
By contrast, Elixir runs on the BEAM and gets 99% of its features from Erlang: you still use processes, supervisors, pattern matching, etc.
So in a sense, the only reason for Elixir to exist is to provide a great developer experience for the BEAM. If it doesn't do that, you might as well use Erlang.
Now you can get errors like this:
________________________________________________________________________________
apps/activity_feed/lib/activity_feed/push_notification_listener.ex:10:callback_type_mismatch
Callback mismatch for @callback push/2 in ActivityFeed.ListenerBehaviour behaviour.
Expected type:
{:error, _} | {:ok, _}
Actual type:
:ok
________________________________________________________________________________
apps/activity_feed/lib/activity_feed/push_notification_listener.ex:24:pattern_match
The pattern
_ = {:error, _}
can never match the type
:error | :okThe lion's share of the work is now extracted into Erlex [1] which can be incorporated into other tools as needed.