From: KDr2 Date: 2009-04-30T17:28:41+09:00 Subject: Re: Ruby Interface of Erlang --001636e909a3b18f750468c17b91 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You're right, String should be converted to List, thanks again=EF=BC=81 On Thu, Apr 30, 2009 at 3:28 PM, Brian Candler wrote: > KDr2 wrote: > > Thank you, I just hava done little update : > > http://github.com/KDr2/erlix/tree/master#fn1 > > Interesting. > > However I think it would be better to turn a ruby string into an erlang > list, rather than an atom, for two reasons: > > (1) It more closely matches what happens in Erlang > > 1> Foo =3D "abc". > "abc" > 2> hd(Foo). > 97 > > (2) I'm not an Erlang expert, but I think I read that Erlang has the > same atom-exhaustion problem that Ruby has with symbols: namely that > once an atom has been allocated it cannot be freed. So it is not a good > idea to keep calling list_to_atom on random strings provided by > untrusted users. > > I'd still expect Ruby symbols to be mapped to atoms, of course. > > Regards, > > Brian. > -- > Posted via http://www.ruby-forum.com/. > > --=20 Best Regards, -- KDr2, at x-macro.com. --001636e909a3b18f750468c17b91--