[erlang-questions] Frames proposal

José Valim jose.valim@REDACTED
Tue May 1 09:37:47 CEST 2012

> The implied mapping takes JSON {id: 4135, title: "title2"}
> to <{id ~ 4135, title ~ <<"title2">>}>.
> The bounded size of the Erlang atom table is a vulnerability
> but there is an EEP to address that; that in itself is a much
> more urgent issue than frames.

Exactly. In Ruby, for example, since atoms aren't garbage
collected, converting a JSON from an external source to a hash using atoms
as keys represents a security vulnerability in a web service, as someone
could force the "atom table" to fill in completely, so we simply don't.

So until the atom limitation is fixed, we would be better on handling JSONs
as a dict or something else.

I have read the proposal completely and I think everything is well
explained and defined. Even though I am not a huge fan of the syntax, I
think it fits Erlang well. One option that I haven't seen considered is
still using curly brackets as delimiters and use `{~}` to specify an empty
frame. This would make the common case (a frame with at least one element)
easier on the eyes by sacrificing a bit the not so common case (empty
frame). But again, we are in good hands with whatever the Erlang and OTP
team decide.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120501/5771ef8e/attachment.htm>

More information about the erlang-questions mailing list