@@ -150,12 +150,14 @@ popular and a great language!
150150Here’s a non-exhaustive list of differences:
151151
152152- Elixir is gradually typed, while Gleam is fully statically typed.
153- - Elixir's type system does not have generics, while Gleam's type system does.
153+ - Elixir's type system does not support user provided type annotations at the moment,
154+ while Gleam's type system does.
154155- Elixir has a powerful macro system, Gleam has no metaprogramming features.
155156- Elixir’s compiler is written in Erlang and Elixir, Gleam’s is written in Rust.
156157- Gleam has a more traditional C family style syntax.
157158- Elixir has a namespace for module functions and another for variables, Gleam
158- has one unified namespace (so there’s no special `fun.()` syntax).
159+ has one unified namespace (so there’s no special `fun.()` syntax, but in Gleam
160+ variable names can shadow function names).
159161- Gleam standard library is distributed as Hex packages, which makes
160162 interoperability with other BEAM languages easier.
161163- Elixir is a larger language, featuring numerous language features not present
@@ -171,11 +173,13 @@ Here’s a non-exhaustive list of differences:
171173 and full support for tools such as code coverage, profiling, and more.
172174 Gleam’s support is much weaker due to going via Erlang source, resulting in
173175 less accurate line numbers with these tools.
174- - Elixir and Gleam both use Erlang's OTP framework. Both have additional
175- modules for working with OTP, which provide APIs more in the style of each
176- respective language. Both common use Erlang's OTP APIs directly, but Elixir
177- can do so more conveniently and concisely due to having a less-strict type
178- system.
176+ - Elixir interactive and remote shells support writing both Elixir
177+ and Erlang code. Gleam shells require writing Erlang code.
178+ - Elixir and Gleam both use Erlang's OTP framework. Both languages can
179+ use Erlang/OTP modules directly, though it is more ergonomic and
180+ requires less boilerplate in Elixir. Both languages offer their own
181+ additional abstractions, with Elixir providing new functionality
182+ and Gleam providing type-safe interfaces.
179183- Elixir currently has superior deployment tooling, including support for OTP
180184 releases and OTP umbrella applications.
181185- Gleam’s editor tooling is superior due to having a more mature official
0 commit comments