Why am I interested in Elixir?
underjord.io
Why am I interested in Elixir?
1–10 of 183 posts
Re: Why am I interested in Elixir?
#2Re: Why am I interested in Elixir?
#3Elixir/Phoenix/Ecto are an absolute joy.
It took a bit to get used to immutability and FP but it feels so "cozy", for lack of a better word, to know exactly what my code is doing and to not be bit by obscured mutability and magic anymore.
Re: Why am I interested in Elixir?
#4Re: Why am I interested in Elixir?
#5- LiveView (which I use in production & have recommended for upcoming projects too) is a complete game changer, not because it allows to remove javascript, but because it removes a boundary (between the client & the server), making development & maintenance much faster since you only have one layer, and also making very rich features easier, because you can remain stateful during the processing (if you have interactive rich UIs with e.g. file upload & processing then live reporting as you process the file, this will remind you of desktop programming, in a good way)
- While the initial setup of apps can be a bit cumbersome to my taste (like the SwitchTower period of Rails - e.g. you'll need a build server or a Docker image typically), the mental model of programming is quite simple in a lot of cases afterwards. I would say that junior developers can be onboarded quite easily (I'm starting to train some), and maintenance is quite sweet at this point.
I can warmly encourage you to try Elixir out (a nice way to get started by the way is to code ExUnit tests to try out the language, see https://github.com/thbar/elixir-playground/blob/master/test/... as a boilerplate to get started).
Re: Why am I interested in Elixir?
#6Re: Why am I interested in Elixir?
#7A couple of months ago we met with a prospective client to discuss their use cases and conduct requirements gathering. They really liked what we showed them, but the CFO wanted a dashboard that displayed the data in the app in a specific way. We shook hands, told them we would contact them soon, and parted ways. It was around 9 AM when we stepped outside the client's office and got back in our cars.
By 5 PM that evening, we had a stunning, fully functional dashboard built and deployed to the demo environment. It utilized a few new database tables that aggregated data, some data processing done by Elixir, passing that data to the Vue front-end and displaying it using Charts.js and a few other UI libraries.
I sent a quick email to the CFO with the URL. He responded ten minutes later with, "holy cow, why didn't you show this during our meeting if you had it already?!" :)
We are meeting with them again later this month, hopefully to sign them on as a client.
(For reference, I've used Rails and ASP.NET with C# before Elixir, along with JQuery back in the day, and then a bit of React. Can't speak about other frameworks and languages.)
Re: Why am I interested in Elixir?
#8I'm hoping to move to 1.9. The language just fit my ideology better, Jose Valim just stated that the language is mostly complete. All major planned features are completed unless something come up. The language isn't bloated, it's small and sweet, and it doesn't go out of the way to add random unnecessary features to the core.
I was fullstack since ~2008 and it is becoming pretty hard to be fullstack when frontend moves too dang fast for me. So the pace of Elixir and Phoenix is amazing. I know these two technology are relatively new but compare to its peers it's boring tech; as in it's battle proven and it's not going to radically change that often (at least not for the sake of hype or reinventing the wheel).
The community over at elixirforum is nice. There seems to be quite a few camps. The ones that stands out to me are the web dev and embedded camps.
Re: Why am I interested in Elixir?
#9Has anyone who previously preferred static typing converted (at least for certain projects) to using Elixir? I won't even put plain Node into production anymore, TypeScript at the minimum, but otherwise OCaml or Go.
Re: Why am I interested in Elixir?
#10the with syntax is nice and helps to deal with early exit on errors but still feels a bit awkward compared to imperative control flow.
like you can do something like this in an imperative language:
foo, err = func()
if err != nil {
return nil, Err("bad")
}
bah, err = func2(foo)
if err != nil {
return nil, Err("blah")
}
return bah
whereas in elixir you have to do something like the following in order to avoid the nesting of doom: with {ok, foo} Error.or({:error, "bad"}),
{ok, bah} Error.or({:error, "blah"}), do
bah
end
like the with blocks kind of work until you have to transform the errors you receive then you need helper functions. if you are just doing static transforms like above it is not too bad but it starts to get hairy if you want to transform based on the returned error or variables in the function. whereas the imperative style you can inline your error handling logic nicely into the function.for example what if i want to log something on the error path that includes some contextual information and custom formatting. probably, the easiest way is going to be to use with() and pipe to a custom function that triggers on the error path to do the logging because the code is going to start getting really messy. whereas if i was writing it imperatively i could just inline the logging statement most of the time because it is just a few lines of code.
foo, err = func()
if err != nil {
return nil, Err("bad")
}
bah, err = func2(foo)
if err != nil {
Logger.error("err: " + err + " when processing: " + foo.name)
return nil, Err("blah")
}
return bah
like i feel this is a bit messy but maybe it is actually not that bad: with {ok, foo} Error.or({:error, "bad"}),
{ok, bah} Error.or_else(fn err ->
Logger.error("err: " err " when processing: " foo.name)
{:error, "blah"}
end), do
bah
end