[erlang-questions] strings vs binaries
Ben Hsu
benhsu@REDACTED
Tue Aug 18 22:16:12 CEST 2015
Hello
I have a simple question, I know Erlang has strings and binary strings as
separate data types, and they're different even if they "look the same" in
the console
1> io:format(<<"fnord">>).
fnord
2> io:format("fnord").
fnord
3> "fnord"==<<"fnord">>
3> .
false
My question is when you will use each one. Are binary strings used for
sending data over the wire, and normal strings used internally? what are
the tradeoffs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150818/cb919f2f/attachment.htm>
More information about the erlang-questions
mailing list