[erlang-questions] unexpected result of term_to_binary

Ulf Wiger ulf@REDACTED
Mon Jan 21 21:33:58 CET 2013


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. :)

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/c4e13329/attachment.htm>


More information about the erlang-questions mailing list