6 ms·
As someone who has used both SML, Haskell, Rust and Elixir professionally: No, not really. Access to the BEAM is nice, but unless you're targeting the BEAM in
by Munksgaard 1y ago
As someone who has used both SML, Haskell, Rust and Elixir professionally: No, not really.
Access to the BEAM is nice, but unless you're targeting the BEAM in your compiler I don't see any benefit. Even if you're targeting the BEAM, you might decide to use another language, cf. Gleam: https://github.com/gleam-lang/gleam/ https://github.com/gleam-lang/gleam/
Edit: Actually, one thing I will mention is the superior support in Elixir/Erlang for pattern matching bitstrings[0]. Not usually helpful in compilers, but an evolution of pattern matching that other languages should take up, in my opinion.
0: https://hexdocs.pm/elixir/Kernel.SpecialForms.html#%3C%3C%3E%3E/1 https://hexdocs.pm/elixir/Kernel.SpecialForms.html#%3C%3C%3E...
- tikhonj 1y agoOCaml also has a binary string pattern matching feature which sounds pretty similar: https://practicalocaml.com/parsing-with-binary-string-pattern-matching/ https://practicalocaml.com/parsing-with-binary-string-patter...
- Rendello 1y agoErlang's bitstring/binary handling is one of those things that once you use, you'll wonder why it's not in every language (alongside, for me, Rust's enum/sum types and Python's badly-named but wonderfully useful while-else).