[erlang-questions] Frames proposal

Juan Jose Comellas <>
Tue May 1 17:48:44 CEST 2012


And what about borrowing the syntax that Anton Lavrik used for erlson [1]?
That syntax looks similar to the one used for records and is much easier to
read/write.

[1] https://github.com/alavrik/erlson


On Tue, May 1, 2012 at 2:27 AM, Richard O'Keefe <> wrote:

>
> On 1/05/2012, at 3:38 PM, Max Lapshin wrote:
>
> > I mean using JSON directly inside Erlang:
> >
> >
> > function({type : <<"article">>, title : Title, id : Id} = Object) ->
> >   Object{id : make_permalink(Id, Title)}.
> >
> > or
> >
> >  Article = {id : 523, title : proplists:get_value(<<"title">>, Params)}
> >
> > I mean this. Your syntax may have some historical roots, but they are
> > too ancient. Nowadays such syntax <{key ~ value>} look like inventing
> > bicycle with square wheels.
>
> JSON syntax is ***Javascript*** syntax.
>
> The frames proposal has always made it very clear why we cannot
> copy JSON syntax.
>
> {}      is already an empty TUPLE,
>        it cannot also be an empty 'dictionary'.
>        We cannot reasonably use unadorned curly
>        braces for frames.
>
> {a:f()} already means a tuple whose one element
>        is the value of a call to the f() function
>        in module a.  We *CANNOT* even unreasonably
>        use a colon in maplets; it is just not going
>        to work.
>
> Have a lollipop.
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120501/0e4ee2ab/attachment.html>


More information about the erlang-questions mailing list