Was this discussed? I can't find any reference to it.
On Mon, Dec 22, 2014 at 1:34 AM, Gary Guo nbdd0...@hotmail.com wrote:
If added, it can help ES engines to write more code in ES instead of
native languages. So +1 as well.
___
es-discuss
Adding Reflect.{isCallable, isConstructor} looks reasonable to me. If the
spec needs these internally, chances are JS developers will need them at
one point. And as you note, typeof === function is a common work-around
in use today. So +1.
2014-12-21 0:20 GMT+01:00 Tom Schuster t...@schuster.me:
If added, it can help ES engines to write more code in ES instead of native
languages. So +1 as well.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Thank you both.
Looking forward to the feedback.
On Fri, Dec 19, 2014 at 6:55 PM, Rick Waldron waldron.r...@gmail.com
wrote:
Done: https://github.com/tc39/agendas/blob/master/2015/01.md
On Fri Dec 19 2014 at 12:26:33 PM Jason Orendorff
jason.orendo...@gmail.com wrote:
Having said that, I
Is there somebody interested in this? The draft spec is rather simple:
Reflect.isCallable (target)
1. If Type(target) is not Object, then throw a TypeError exception.
2. Return the result of calling the abstract operation IsCallable(target).
Reflect.isConstructor (target)
1. If Type(target)
On Tue, Dec 16, 2014 at 3:05 PM, Tom Schuster t...@schuster.me wrote:
Hello,
right now there is no way in normal JS code to replicate the IsConstructor
check defined in 7.2.4.
function isConstructor(obj) {
var p = new Proxy(obj, {construct() { return p; }});
try {
new p;
}
Having said that, I do think Reflect.isCallable and isConstructor
would be a fine addition to ES7. These places where we check if an
internal method exists feel like a sort of secret-handshake part of
the MOP; we should expose them.
Any objections?
Would someone please add it to the agenda for
Done: https://github.com/tc39/agendas/blob/master/2015/01.md
On Fri Dec 19 2014 at 12:26:33 PM Jason Orendorff jason.orendo...@gmail.com
wrote:
Having said that, I do think Reflect.isCallable and isConstructor
would be a fine addition to ES7. These places where we check if an
internal method
Hello,
right now there is no way in normal JS code to replicate the IsConstructor
check defined in 7.2.4.
IsCallable can be done with typeof == function. I think this might be
useful in some cases and is trivial to implement.
Cheers,
Tom
___
es-discuss
9 matches
Mail list logo