[erlang-questions] String versus variable in binary literal

Richard O'Keefe <>
Thu May 17 00:12:37 CEST 2012


The real answer is that <<"foo">> is ad hoc special purpose syntax;
there is (as yet) no provision for building a binary using any old
string, only for string *literals*.

This hack went in basically to provide a more-or-less convenient
way to write string-as-binary literals.

Yes, it's confusing, and yes, it would be nice if any
list-of-character-code expressions were allowed.





More information about the erlang-questions mailing list