[erlang-questions] String versus variable in binary literal

Steve Davis steven.charles.davis@REDACTED
Thu May 17 03:02:52 CEST 2012


Confusing, sure. But not impenetrable...

How is "foo" more typed than <<"foo">>?

Meaning:
[ 102,111,111 ]
<<102,111,111>>

Isn't the problem really the idea of a "string"?

When and how - without proper definition of the context - are you supposed to know when a sequence of integers (in either list or binary format) is actually text, and indeed what particular flavor of text?

The confusion is magnified by the fact that the implicit context assumption of a participant decoder implementation hides the underlying assumption of the encoder.

/s


More information about the erlang-questions mailing list