On Tue, Nov 22, 2011 at 10:41 AM, Brendan Eich <bren...@mozilla.com> wrote:

>
> Nothing there about arrays or regular expressions, and the function
> examples do *not* show anything like
>
>  superFun <| function (...) {...}
>
> Instead of Ahem'ing, could you cite what you claim is a prior proposal
> with specifics showing how it addresses object, array, regexp and function
> [[Prototype]] presetting?
>

I'm guessing this been proposed before but I think you could handle all of
those except RegExp with syntax something like:

// object:
{ extends someObj, prop1: value, prop2: value }

// array:
[ extends someObj, value1, value2 ]

// function declaration:
function foo(arg) extends someObj { ... }

// function expression:
function(arg) extends someObj { ... }

You could *maybe* cram it into RegExp with something like:

/pattern/ extends someObj;

I haven't been following the <| discussion closely (it seems like it's in
good hands and has lots of smart people poking at it) so forgive me if this
was proposed and rejected for valid reasons while I wasn't looking. :)

- bob
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to