o.{
    a.b = 6;
    c.f();
    a.b = a.c; // !!
};

This is indeed an issue that could be solved using

   o.{
       .a.b = 6;
       .c.f();
       .a.b = .a.c;
   }

My previous sample would be rewritten :

   var style = "color: red";
   var elem = document.createElement("span");

   elem.{
       .className = "hello";
       .style = style;
       .id = .uniqueID;
   };

This looks a lot like the C# syntax of the 'with' statement, which is maybe a good idea.

   dynamic obj = new ... with {
       .a = "hello";
       .b = inScopeVar;
       .c = .a + .b;
};
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to