The fact that it's a dynamic language make problems similar to Node / Python, can't dev serious backend services without a strongly type language. Not saying you can't, but you will have a lot of issues overtime that would have been catch at compile time.
Having used all three in backend systems, I definitely disagree that they have the same problems. Elixir is strongly typed but lacks static typing, in exchange it has a powerful pattern matching system that more than makes up for this problem in my experience. But fundamentally the issues caused by lacking static typing is different from the problems caused by being weakly typed like python and node systems are.
Lovely Week with Elixir
41–50 of 139 posts
Re: Lovely Week with Elixir
#42Btw. If anyone is interested, I'm working on prettier plugin for html l?eex files. Probably gonna publish it next week.
Re: Lovely Week with Elixir
#43The BEAM is a huge win: having lightweight threads means you can often do away with things like Redis for job queues and PubSub stuff. I love this answer on StackOverflow by Elixir's creator: https://stackoverflow.com/questions/32085258/how-can-i-sched... So simple. Something that would require a job queue and a job runner fades away into a piece of the OTP application tree. When it crashes, it will even come right b…
For any serious application you want a job like that to be persisted so you can guarantee it runs even if your application is restarted.
I know that Erlang/Elixir is designed for stateful applications and if you have a cluster and do hot deploys this is less of a problem, but who does that? Most Elixir applications I've seen are deployed as stateless systems just like any Ruby, Python, Node etc systems.
Re: Lovely Week with Elixir
#44Another person who liked Elixir, cool :) Btw. If anyone is interested, I'm working on prettier plugin for html l?eex files. Probably gonna publish it next week.
Re: Lovely Week with Elixir
#45I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits. But there are some great language features, like guards and p…
It's good to hear this, though. I might have to try and re-prioritize learning it again.
Do you have any good resources on hand that you used and would recommend?
Re: Lovely Week with Elixir
#46The BEAM is a huge win: having lightweight threads means you can often do away with things like Redis for job queues and PubSub stuff. I love this answer on StackOverflow by Elixir's creator: https://stackoverflow.com/questions/32085258/how-can-i-sched... So simple. Something that would require a job queue and a job runner fades away into a piece of the OTP application tree. When it crashes, it will even come right b…
Re: Lovely Week with Elixir
#47I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits. But there are some great language features, like guards and p…
> I don't super love the optional typing thing It might not be a plus if you're writing a web-app, or some other kind of easily-restarted "shared-nothing business layer" system. But get deep-enough into absorbing the Zen of Erlang (i.e. by trying to write a big-deal telecom system; or by working on a distributable Erlang DBMS like CouchDB), and you'll come to appreciate it. Specifically, you'll realize that it'd actu…
It would be up to the developer to account for different versions of the data when writing out type definitions, and the worst case is that you try to access a property that doesn’t exist or is the wrong type, and it crashes and causes the process to get restarted like what already happens in Erlang.
So it wouldn’t be a guarantee of correctness just like Typescript isn’t, but it could still offer a lot of safety assuming you get the type definition a right.
Re: Lovely Week with Elixir
#48I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits. But there are some great language features, like guards and p…
Re: Lovely Week with Elixir
#49Elixir is decent and I've worked with it a fair amount in production systems... Mostly Rubyists seem to really click with it. And ruby idioms are all over it - you can taste its history and proximity to ruby's ecosystem. As a scala dev that ended up working with elixir for a couple years, my opinion is that a typesafe elixir-like language would really bring BEAM back into the mainstream. Akka is alright but it's shoe…
I want to echo Gleam [0] as a project to watch out for. It's still very early, but it's evolving quickly, and has a big focus on providing ergonomic tooling. It's an ML inspired, statically typed language that compiles down to Erlang, and supports interop with the existing ecosystem. This means that you get access to ADTs, type inference, etc, while still being able to lean on OTP for your concurrency primitives. The…
Re: Lovely Week with Elixir
#50I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits. But there are some great language features, like guards and p…
Check out the Elixir "protocol" feature, it's similar to interfaces: https://elixir-lang.org/getting-started/protocols.html