francois.remy.dev at outlook.com
Tue Jan 8 14:23:18 PST 2013
> We could potentially switch from magic to private symbols but DOM
> bindings are highly optimized and I don't think we could afford making
> these use symbols. (Right now the pointer is stored at a statically
> know offset of the js object.)
Can we use both systems in parallel? In case you hit the "invalid cast" case, you can check if you received a Proxy. If you received a proxy, you retry the cast using its target instead. This seems reasonable: you keep the very-fast-path for the most common case, but polyfills authors accept to pay a (small price) when they use a proxy.
Do you think this would be in the "acceptable" domain for you?
More information about the es-discuss