Live data from Hacker News

Elixir v1.20: Now a gradually typed language

elixir-lang.org

61–70 of 426 posts

Re: Elixir v1.20: Now a gradually typed language

#62
post #20

Found 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

You make me laugh as well, all is good.

Re: Elixir v1.20: Now a gradually typed language

#63

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.

Gleam doesn't have macros, which many Elixir libraries (such as Phoenix and Ecto) uses to great effect.

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

#64
post #10

Oh 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…

There's also the "bible": https://www.manning.com/books/elixir-in-action-third-edition

Re: Elixir v1.20: Now a gradually typed language

#65
post #46

Earlier 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…

I agree that actor languages are the purest form of OOP as Alan Kay has expressed it. And unlike Smalltalk, Erlang just accepts that some things are naturally functions, not messages.

Re: Elixir v1.20: Now a gradually typed language

#66
post #46

Earlier 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…

Why do you find Erlang useless, you just don't like the syntax?

Re: Elixir v1.20: Now a gradually typed language

#67
post #10

Oh 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…

FYI, that’s currently available in a Humble Bundle with 16 other PragProg functional programming books: https://www.humblebundle.com/books/ultimate-functional-progr...

Re: Elixir v1.20: Now a gradually typed language

#68
post #35

Earlier 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.

No one I know wears the shoes I like to wear, which is too bad, because that means I can't enjoy them as much now.

Re: Elixir v1.20: Now a gradually typed language

#69
post #35

Earlier 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.

People use it.

Re: Elixir v1.20: Now a gradually typed language

#70
post #60

Earlier 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.

If you don't want to then fair enough :) that said if your problem is just installation, some of the gleam people realized it can be tricky and made a nice guide for various operating systems and package managers: https://gleam.run/install/

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

Post reply on HN