Should I be able to apply `new`?

Brendan Eich brendan at mozilla.org
Fri Apr 6 12:11:13 PDT 2007


On Apr 6, 2007, at 11:50 AM, Graydon Hoare wrote:

> The latter -- intrinsic::construct -- is a function the runtime  
> provides
> to let user code *apply* the standard construction protocol -- as in
> operator 'new' -- to a class and an arguments array. Just as
> Function.apply applies the standard calling protocol to a function and
> an arguments array. IMO we should be providing intrinsic::construct.
> It's in the reference impl at the moment.

Oh, great -- I missed it in the meta separation.

What parameters does it take? (/me looks...) Ok, I see  
magic::construct, but no intrinsic::construct. Little help?

Anyway, it's good to have a way to compose new and apply, IMHO. If  
the parameterization is right, we are done. The right  
parameterization includes the class *or function* and the arguments  
array. It should not be a class-only thing.

/be




More information about the Es4-discuss mailing list