It seems to me that a function is a callable object, not the other way
around. As if a Function were an implementation of Callable, where
callable was an interface.

For programs to be concerned more with the object's capability -- what
it can do -- not who constructed it.

Considering how that would affect the toString method:
"The intrinsic toString method converts the executable code of the
function to a string representation"

Some objects are callable, but the source code isn't avaiable. Object
such as window.addEventListener, in a modern browser.

This implementation of toString, quoted above, would be appropriate
for Function, but not necessarily all Callable objects, such as
window.alert in a browser:-

javascript:void(Function.prototype.call.call(alert, window, alert));


-G

2008/3/10 Lars Hansen <[EMAIL PROTECTED]>:
> First draft of the spec for the Function class.  Please comment.
>
>  --lars
>
> _______________________________________________
>  Es4-discuss mailing list
>  Es4-discuss@mozilla.org
>  https://mail.mozilla.org/listinfo/es4-discuss
>
>
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to