Re:Memory use in CPython and MicroPython
by patrec on Sunday July 02, 2017 @04:22PM
(#14684166)
> It is nice in a theoretical sense, in the same way Haskell's [Char] is nice, in a practical sense it's awful.
Haskell's list of Char is awful in both a theoretical and practical sense whereas in erlang's case you can think of it as just a degenerate iolist.
> I don't remember Erlang having much if any string-manipulation API for working on bytes
Elixir is better but erlang certainly has string manipulation functionality for binaries: pattern matching, regular expressions, search, splitting and joining etc.
> This is only for output, so they're not actually ropes.
Not true, lots of non-output functions also accept iolists, e.g. the re module.
Haskell's list of Char is awful in both a theoretical and practical sense whereas in erlang's case you can think of it as just a degenerate iolist.
> I don't remember Erlang having much if any string-manipulation API for working on bytes
Elixir is better but erlang certainly has string manipulation functionality for binaries: pattern matching, regular expressions, search, splitting and joining etc.
> This is only for output, so they're not actually ropes.
Not true, lots of non-output functions also accept iolists, e.g. the re module.