.newApply() ?

zwetan zwetan at gmail.com
Sun Nov 11 04:11:50 PST 2007

On Nov 11, 2007 1:34 AM, Brendan Eich <brendan at mozilla.org> wrote:
> Got your back here ;-). Narcissus (http://lxr.mozilla.org/mozilla/
> source/js/narcissus/) wants this too, and it's going to end up
> falling out of the reflection APIs:
>      reflect::typeOf(this).reflect::construct(arguments)
> or of course:
>    { use namespace reflect;
>       . . . typeOf(this).constructo(arguments) }

eden want this too :)

in there I got a scanFunction()
that need to be able to switch between a simple function call with arguments
or a contructor call with arguments, at runtime

so 2 follow up questions about the reflect namespace

is something as

var str = "some.thing::MyClass";
var c:Class = getObjectFromString( str ); //maybe a use of eval here ?
var instance:* = eflect::typeOf( c ).reflect::construct(arguments);

can work ?

]> in your example. The http://wiki.ecmascript.org/doku.php?
> id=proposals:meta_objects proposal is out of date, it uses iterators
> for the type and value parameters, but IIRC we have agreement to
> satisfy your use-case. See http://bugs.ecmascript.org/ticket/232.

and then the second question,
is the meta objects and reflect namespace are optionnal ?

some months ago I remember they were but now in the wiki page
I see
"This proposal is to amend the spec with a normative set of meta-objects
which must be present in any program and accessible at runtime."

but as the page is out of date, just wondering


More information about the Es4-discuss mailing list