On 30 May 2012 23:34, David Herman <[email protected]> wrote:
> On May 30, 2012, at 2:27 PM, Rick Waldron wrote:
>
> On Wed, May 30, 2012 at 5:22 PM, David Herman <[email protected]> wrote:
>>
>>
>>    array.{
>>        pop();
>>        pop();
>>        pop();
>>    };
>>
>>    path.{
>>        moveTo(10, 10);
>>        stroke("red");
>>        fill("blue");
>>        ellipse(50, 50);
>>    };
>>
>>    this.{
>>        foo = 17;
>>        bar = "hello";
>>        baz = true;
>>    };
>
>
> This is beautiful and looks powerful -- will it still meet the most
> common/obvious use case?
>
> var div = document.createElement().
>
> div.{
>   style.{
>     color = "red";
>     left = "100px";
>   }
> };
>
>
> I didn't specify in my blog post. :) I'm open to it. I tend to find the
> nested syntax a little brain-exploding, but I understand the motivation.

Assuming you propose to allow things like o.{a.b = 6; c.f()} anyway,
then the above would actually fall out for free if you defined your
syntax as pure syntactic sugar, and do the rewriting in the natural
bottom up manner.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to