News for hackers. Stuff that matters.
Re:Elixir and Phoenix after two years by dmitriid on Tuesday April 06, 2021 @02:45AM (#26708768)
> The equivalent of "hello world" in erlang is

is "hello world".

Edit:

I know that "" in Elixir is binaries which are <<>> in Erlang. In Erlang "hello world" is really a list of ["h", "e", "l", "l", ...].

What was surprising to me is how rarely that matters (unless you actually do a lot of text processing). And the functions that matter (like I/O) deal with io_lists anyway.

And since strings in Elixir are binaries, when you actually need to work with binaries, you're back to the same/similar syntax:

  <<0:1, 0:1, 1:1, 1:1>> == <<3:4>> %% Erlang

  <<0::1, 0::1, 1::1, 1::1>> == <<3::4>> ## Elixir


> Keyword lists in erlang are unpretty

Keyword lists in Elixir are nice, that's true.

There are no comments on this comment yet.