If we ever have the idea to introduce throw-when-trap-is-undefined handlers

# David Bruant (13 years ago)

This is just a short note. In the previous design, some internal proxy operations threw when there was a missing fundamental trap. We also considered at some point making missing traps of Handler (previously VirtualHandler) [1] throw as well (I suggested to make Object.getPrototypeOf(VirtualHandler.prototype) === Reflect, it's still in the open issues).

I was playing with ES6 maps and I implemented a proxy wrapper for maps to make them looks like objects (syntactic sugar) [2]. I wanted all irrelevant traps to throw. It took about 5-6 lines to define a meta-handler as you'll see, so maybe it's not worth defining "throw-if-undefined trap" when another useful (and more complicated to implement) solution can be found.

David

[1] harmony:virtual_object_api [2] gist.github.com/3918227