On Sep 18, 2011, at 12:22 AM, Andrea Giammarchi wrote:

> On Sun, Sep 18, 2011 at 6:07 AM, Brendan Eich <[email protected]> wrote:
> 
> Binary data does no such thing! The descriptors are per generated 
> type-constructor, not per instance.
> 
> once you define a StructType how do create an instance ?
> 
> new Point2D({x: 0, y: 0});

p = new Point2D;
p.x = 0;
p.y = 0;


> or binary data can create instances only through ArrayTypes as shown in your 
> slides ?

The slide shows both struct and array type constructor generation and 
invocation via new. See the harmony proposals for details.


> is there no proposal to bring named arguments as is for python in JS.next ?
> 
> function withDefaults(a = 0, b = 0, c = 0) {
>     return a + b + c;
> }

Yes, that's in the wiki.


> If yes, is there no way to call arguments pythonish way ?
> 
> withDefaults(a = 1, c = 2)

No, that's unrelated and not proposed.

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

Reply via email to