On 28 September 2014 20:34, Michał Wadas michalwa...@gmail.com wrote:
We have Object.observe (asynchronous callback whenever object
properties changes), but do we need Function.observe (asynchronous
callback whenever function is called)?
Cons:
- can prevent many optimizations (but
It sounds like you want a standardized debugger and profiler API, rather
than a language feature. Every engine is different enough internally that I
don't think it makes sense to have a standardized debugger API.
That said, the Mozilla Debugger API is quite impressive. It might make
sense to look
We have Object.observe (asynchronous callback whenever object
properties changes), but do we need Function.observe (asynchronous
callback whenever function is called)?
Cons:
- can prevent many optimizations (but Object.observe too)
Pros:
- allows easy debugging and profiling
- allows extending
Beware not to resurrect function.{caller,callee,arguments}, that were killed
(in strict mode) for good reason. With your proposal, you will be able to
observe objects that otherwise you haven't access to. I think that, at the very
least, you should forget `arguments` and `thisArg`, and, instead
4 matches
Mail list logo