Re:Comparing Elixir and Go
by filmor on Friday January 27, 2017 @05:58AM
(#13499024)
What is different in Erlang is that strings are a bit messed up in that they are linked lists of numbers. What you are suggesting (constructing the actual string in-place) works fine in Erlang, too, but has a bit of a funky syntax:
However, the main advantage of using io_lists instead is that `["Welcome", Username, "!"]` has constant complexity with regard to the length of `Username`.
[ Parent
| on HN ]
Re:Comparing Elixir and Go
by diamondlovesyou on Friday January 27, 2017 @07:52AM
(#13499447)
Note to anyone not already familiar: in Elixir, character strings are all binaries from the start. Just to avoid the notion that Elixir follows the mistake of strings-are-linked-lists from Erlang.