[erlang-questions] Frames proposal

Michael Turner michael.eugene.turner@REDACTED
Tue May 1 07:58:52 CEST 2012


Max Lapshin: "Your syntax may have some historical roots, but they are
too ancient."

"Ancient" always trumps "unworkable."

Max again: "Nowadays such syntax <{key ~ value>} look like inventing
bicycle with square wheels."

Bzzt. Analogy fail. Whatever a bicycle with square wheels might *look* like

   http://3.bp.blogspot.com/_uhH7HeUdvmw/TB7l0F7aGCI/AAAAAAAAACU/lx6z8b6g-XM/s1600/square_wheels.jpg

we can agree that such a bicycle couldn't work -- well, except perhaps
in a special environment

  http://www.math.hmc.edu/funfacts/figures/10001.2-3-8.1.gif

in which square wheels are actually ideal.

If there's any parallel to the ideal-square-wheel special environment,
here, it's existing Erlang syntax, which is so weird and annoying that
even some ardent fans of the language can't refrain from open
criticism. Richard is looking for what would be the "smoothest ride"
given what can't be changed. I think he's made the best of some
not-very-satisfactory choices. And it's not like he and I exactly
agree on syntax issues (but let's not go there again. Ever.)

Richard: "Have a lollipop."

Curmudgeon points for that one.

This proposal is almost 10 years old. Is it really so radical that we
couldn't have it in beta within three months?

-michael turner

On Tue, May 1, 2012 at 2:27 PM, Richard O'Keefe <ok@REDACTED> 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
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list