[erlang-questions] next(Erlang): "Fix up records so that records are first-class citizens and not just syntax saccharine for tuples?"
Bob Ippolito
bob@REDACTED
Sat Nov 22 01:26:57 CET 2008
On Fri, Nov 21, 2008 at 4:07 PM, damien morton <dmorton@REDACTED> wrote:
> On Sat, Nov 22, 2008 at 10:27 AM, Steve Davis
> <steven.charles.davis@REDACTED> wrote:
>>
>>> > - Consider how close/far JSON maps to record tuples
>>>
>>> Richard's frames map very nicely to JSON and back.
>>>
>>
>> Hmm. JSON uses Strings for property names -- is it really an impedance
>> mismatch that you should dismiss so easily?
>> i.e.
>> JSON: { "Object": {"name": "Damien", "location": "here" }}
>> Erlang: -record(object {name, location}) which has a tuple
>> representation { "Damien", "here" }
>> (case differences emphasized for effect)
>
> Not dismissing it at all. Richard's frames proposal uses atoms for
> "property names". Every atom can be converted to a string, and every
> string can be converted to an atom. An atom is basically an interned
> string.
That's not strictly true, atoms are limited to 255 characters I think.
-bob
More information about the erlang-questions
mailing list