News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust (2020) by jhgg on Monday February 22, 2021 @02:07PM (#26228939)
We will continue to use beam/otp where it makes sense. In fact some rust runs in BEAM now thanks to Rustler. We wrote a blog about this!

https://blog.discord.com/using-rust-to-scale-elixir-for-11-m...

Re:Why Discord is switching from Go to Rust (2020) by Thaxll on Monday February 22, 2021 @02:15PM (#26229053)
You said that Go doesn't have: algebraic data types, enums, borrow checker, and compile time memory management/safety which Erlang / Elixir is even worse in some of those because it's a dynamic typed language so it's a bit confusing.
Re:Why Discord is switching from Go to Rust (2020) by jhgg on Monday February 22, 2021 @02:28PM (#26229278)
I think you're missing the point. We use Elixir to solve one class of problems which its excellent in doing (notably: real time distributed systems.) In this area, there is nothing even remotely close in terms of capability. So, we choose the runtime over the language (elixir is a pretty cool dynamic language though!). Also, due to the unique nature of Erlang/Elixir, a lot of problems that exist in C/C++/Rust/Go don't exist in that language. Of course this has meant writing a lot more tests to test things that a typechecker should be able to catch. But it is what it is. We're following Gleam though to see where that ends up.

BTW, here's some places I've spoken about Discord's Elixir usage:

- a podcast: https://smartlogic.io/podcast/elixir-wizards/s5e8-nowack-hei...

- interview with José Valim (elixir's creator): https://elixir-lang.org/blog/2020/10/08/real-time-communicat...

Re:Why Discord is switching from Go to Rust (2020) by jaytaylor on Monday February 22, 2021 @07:30PM (#26232476)
Gleam looks like a very promising language! I hadn't seen it before.

https://gleam.run/book/tour/try.html

It also looks like there are currently some serious limitations:

https://github.com/gleam-lang/otp

Re:Why Discord is switching from Go to Rust (2020) by c-cube on Monday February 22, 2021 @04:34PM (#26230959)
I think a difference is that Elixir is deliberately dynamically typed, so you don't expect type safety. You write the happy path and rely on "fail fast" and the actor hierarchies to write robust code.

Besides, Elixir/Erlang has the best dynamically-typed equivalent of algebraic types (tuples + atoms + pattern matching) :-)