How does it compare to Gleam? Or rather, why use Elixir over Gleam now? I suppose Phoenix and Live View in particular are big draws to Elixir.
Elixir v1.20: Now a gradually typed language
61–70 of 426 posts
Re: Elixir v1.20: Now a gradually typed language
#62Found elixir intriguing and so Phoenix. Two reasons I put it aside again are: You need Beam and the Elixir. I find that really weird, because I'm used to just the language like in Python, Java, C, Rust. Not something underneath it, too. There is no debugger. The way to debug Elixir is to print stuff to the console, like 40 years ago. No thanks.
I genuinely needed that laugh. Thank you
Re: Elixir v1.20: Now a gradually typed language
#63How does it compare to Gleam? Or rather, why use Elixir over Gleam now? I suppose Phoenix and Live View in particular are big draws to Elixir.
Gleam for example has issues with verbosity of decoding/encoding json whereas in Rust you derive serde and in Elixir it's just a function call away.
Elixir has a more mature ecosystem. While you can for example use Phoenix with Gleam (or some other Gleam framework) the experience just isn't the same.
The big draw with Gleam over Elixir is the typing (where Elixir is now closing the gap) and being able to compile to JavaScript (which is also what Hologram is doing for Elixir).
I prefer Gleam's typing system and the Rust-like syntax, but for now I feel Elixir is the better choice for all my web dev projects.
Re: Elixir v1.20: Now a gradually typed language
#64Oh shit here I go (and learn Elixir for a whole year (again)) again. I love everything about Elixir, but Elixir constantly makes me doubt myself like no other language. My brain isnt made for functional stuff, but this makes me want to try again. Sucks that it's not really a beginner friendly ecosystem and usually, when having questions answered, people assume you already know a lot about the language.
https://pragprog.com/titles/lhelph/functional-web-developmen... don't let the title fool you - the first half of the book is just elixir over the past 8 years this is the book i've used to ramp back up on elixir and it works like a charm every time - i've never finished it for me, a mark of a good programming book in this tutorial-project style is that I have started it half a dozen times and never finished it becaus…
Re: Elixir v1.20: Now a gradually typed language
#65Earlier quoted context omitted.
Do you like Rust or do you like Erlang? Writing Gleam is like writing Rust, writing Elixir is like writing Erlang. I don't know the current state of Gleam OTP, but last I checked it wasn't great. If you don't care about either of those things and only about types, use Gleam. But then why not just use Rust?
> writing Elixir is like writing Erlang I wrote both Elixir and Erlang code. Erlang is just useless to me as a programming language; it has many great ideas though. I love the idea of being able to think in terms of immortal, re-usable, safe objects (Erlang does not call these objects, but to me this is OOP by Alan Kay's definition. I don't use e. g. the java definition for OOP.) Elixir built on that and made Erlang…
Re: Elixir v1.20: Now a gradually typed language
#66Earlier quoted context omitted.
Do you like Rust or do you like Erlang? Writing Gleam is like writing Rust, writing Elixir is like writing Erlang. I don't know the current state of Gleam OTP, but last I checked it wasn't great. If you don't care about either of those things and only about types, use Gleam. But then why not just use Rust?
> writing Elixir is like writing Erlang I wrote both Elixir and Erlang code. Erlang is just useless to me as a programming language; it has many great ideas though. I love the idea of being able to think in terms of immortal, re-usable, safe objects (Erlang does not call these objects, but to me this is OOP by Alan Kay's definition. I don't use e. g. the java definition for OOP.) Elixir built on that and made Erlang…
Re: Elixir v1.20: Now a gradually typed language
#67Oh shit here I go (and learn Elixir for a whole year (again)) again. I love everything about Elixir, but Elixir constantly makes me doubt myself like no other language. My brain isnt made for functional stuff, but this makes me want to try again. Sucks that it's not really a beginner friendly ecosystem and usually, when having questions answered, people assume you already know a lot about the language.
https://pragprog.com/titles/lhelph/functional-web-developmen... don't let the title fool you - the first half of the book is just elixir over the past 8 years this is the book i've used to ramp back up on elixir and it works like a charm every time - i've never finished it for me, a mark of a good programming book in this tutorial-project style is that I have started it half a dozen times and never finished it becaus…
Re: Elixir v1.20: Now a gradually typed language
#68Earlier quoted context omitted.
That is just wrong. > You need Beam and the Elixir. I find that really weird, because I'm used to just the language like in Python, Java, C, Rust. Not something underneath it, too The beam is a VM. You get that Java requires a VM too right? It’s called JVM for a reason. And Python requires an interpreter. > There is no debugger. The way to debug Elixir is to print stuff to the console, like 40 years ago. That is fals…
Almost nobody uses it though, which is too bad, especially since multi-head functions sometimes make it difficult to follow the execution path. I'd like to do step by step but I cannot plug the debugger to VScode from inside a docker container.
Re: Elixir v1.20: Now a gradually typed language
#69Earlier quoted context omitted.
That is just wrong. > You need Beam and the Elixir. I find that really weird, because I'm used to just the language like in Python, Java, C, Rust. Not something underneath it, too The beam is a VM. You get that Java requires a VM too right? It’s called JVM for a reason. And Python requires an interpreter. > There is no debugger. The way to debug Elixir is to print stuff to the console, like 40 years ago. That is fals…
Almost nobody uses it though, which is too bad, especially since multi-head functions sometimes make it difficult to follow the execution path. I'd like to do step by step but I cannot plug the debugger to VScode from inside a docker container.
Re: Elixir v1.20: Now a gradually typed language
#70Earlier quoted context omitted.
If you're going to try and use this analogy, you need to compare Elixir to Kotlin or Scala or Clojure rather than Java. Elixir is a language written for the BEAM which was created for Erlang. The BEAM happened to be useful VM for these other languages such as Elixir, Gleam, LFE, & Luerl.
No, I don't. I'm not writing gleam etc for the same reasons.
Note this includes installing erlang as well
While it is multiple steps, the frustration is a much more one time thing compared to the problems and frustrations you'd have using a language or its ecosystem for a long time or big project