[erlang-questions] unexpected result of term_to_binary

Joe Armstrong erlang@REDACTED
Mon Jan 21 21:56:59 CET 2013


On Mon, Jan 21, 2013 at 9:33 PM, Ulf Wiger <ulf@REDACTED> wrote:

>
> Yeah, and…
>
> 1> erl_scan:string("\"abc\"").
> {ok,[{string,1,"abc"}],1}
>
> ...so an uneducated user might be forgiven for thinking that there *are*
> in fact strings in Erlang. :)
>

Right - I guess it should be {ok,[{string_literal,1,[65,66,67]}]}
which would be even more confusing.



>
> BR,
> Ulf W
>
> On 21 Jan 2013, at 21:30, Steve Davis wrote:
>
>
> On Jan 21, 2013, at 2:26 PM, Joe Armstrong <erlang@REDACTED> wrote:
>
>
>
> On Mon, Jan 21, 2013 at 8:38 PM, Steve Davis <
> steven.charles.davis@REDACTED> wrote:
>
>> The following appears to encode lists of integers as strings (?!?):
>>
>>
> No no no  - Erlang doesn't have strings - there are no strings in Erlang
> (repeat this 100 times).
>
>
> Indeed, but the documentation says byte 107 means:
> 8 External Term Format
> 8.14  STRING_EXT
>
> So please forgive the "inaccuracy" :-)
>
> br,
> /s
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
> http://feuerlabs.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130121/6aefe9e0/attachment.htm>


More information about the erlang-questions mailing list