News for hackers. Stuff that matters.
Re:Elixir Design Goals (2013) by yellowapple on Saturday December 24, 2016 @12:13AM (#13248683)
If you want them to be, yes.

Erlang's normal "string" type is indeed a list of integers representing codepoints. Erlang also supports "bitstrings" or "binary strings", which are basically what most other languages would just call "strings", as a logical extension of its existing binary data syntax.

Elixir instead uses Erlang "bitstrings" as its default "string" type. Erlang integer-list-based "strings" are represented in Elixir by using single-quotes instead of double-quotes around such a string (or by just manipulating a list directly; Elixir will transparently convert a list of integers into an Erlang-style charlist if the integers are valid codepoints).

There are no comments on this comment yet.