[erlang-questions] String versus variable in binary literal

Steve Davis <>
Thu May 17 03:13:42 CEST 2012


However, should you jump on this idea thinking that "therefore erlang needs stronger typing" then IMHO you have lost sight of the underlying issue of the binary transmission of text; and I would propose that Joe's UBF tagging has a far more interesting remediation!

/s

On May 16, 2012, at 8:02 PM, Steve Davis wrote:

> 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