Problem in finding the difference between string and list

Mickael Remond mikl@REDACTED
Sat Dec 30 17:19:42 CET 2000


Hello,

I have got some problems in testing the difference between string and list (In
fact this is the same thing) to make an erlang interface to a string
protocole.

I must convert an Erlang structure to a specific syntax, explicitely showing
the types...

[{field1, "test"}, {field2, [12,13,14]}] should be converted to:
[$field1=test(field2=@12@REDACTED@14)]

knowing that $, @ and ( are expressing the type.


What is the best way to work around this problem:
- use of atom instead of string ? (But I have heard that they are not garbage
collected) ?
- use of binary type instead of string ? (Is there any problem with that ?)

Thank you for your advice.

-- 
Mickaël



More information about the erlang-questions mailing list