Re: Type Checking?

2007-10-12 Thread Brendan Eich
On Oct 11, 2007, at 10:36 PM, Garrett Smith wrote: So that that's out of scope for ES4; it's OK for host objects to have custom behavior. I'm afraid so, but we could say that host objects that are callable SHOULD be functions if they appear to be functions otherwise; we could say that all

Re: Type Checking?

2007-10-11 Thread Mike Shaver
On 10/11/07, Garrett Smith [EMAIL PROTECTED] wrote: If an object accepts arguments, it is callable, and if it is callable, it supports ,call(), right? Assuming you mean has itself a Callable member named 'call', then I think the answer is no -- being Callable means having a [[Call]] operation

Re: Type Checking?

2007-10-11 Thread Brendan Eich
On Oct 11, 2007, at 1:36 PM, Garrett Smith wrote: On 10/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Oct 10, 2007, at 3:53 PM, Garrett Smith wrote: if (it is Callable) ... I wonder how host objects will deal with this. Will there be a transitive relationship of callable and ()? For

Re: Type Checking?

2007-10-11 Thread Garrett Smith
Incomplete sentence Microsoft often says that it is necessary to retain backwards compatibility. I would hope they would [not continue on this path.] -- EDIT. ___ Es4-discuss mailing list Es4-discuss@mozilla.org

Re: Type Checking?

2007-10-11 Thread Brendan Eich
On Oct 11, 2007, at 8:02 PM, Garrett Smith wrote: If you want to apply or call a non-function callable, use Function.apply(callable, thisp, argArray) or Function.call(callable, thisp, arg1, ...argN). So these are equivalent? aNonFunctionCallableObj() Function.call( aNonFunctionCallableObj

Re: Type Checking?

2007-10-11 Thread Garrett Smith
On 10/11/07, Brendan Eich [EMAIL PROTECTED] wrote: On Oct 11, 2007, at 8:02 PM, Garrett Smith wrote: If you want to apply or call a non-function callable, use Function.apply(callable, thisp, argArray) or Function.call(callable, thisp, arg1, ...argN). So these are equivalent?

Type Checking?

2007-10-10 Thread Garrett Smith
= document.getElementsByTagName(iframe)[0].contentWindow; i.someFunction instanceof Function; // false. How is type checking addressed in ES4? Garrett -- Programming is a collaborative art. ___ Es4-discuss mailing list Es4-discuss@mozilla.org https

Re: Type Checking?

2007-10-10 Thread Garrett Smith
. This is perfectly legal, according to the spec. See http://bugs.ecmascript.org/ticket/153 -- for a general, universal is-it-callable test, you would write if (it is Callable) ... How is type checking addressed in ES4? The |is| operator tests universal or Platonic type, which involves shared

Re: Type Checking?

2007-10-10 Thread Brendan Eich
://bugs.ecmascript.org/ticket/153 -- for a general, universal is-it-callable test, you would write if (it is Callable) ... How is type checking addressed in ES4? The |is| operator tests universal or Platonic type, which involves shared, immutable type descriptors that do not vary across windows