Ranando King (2018-01-15T15:39:22.000Z)
kingmph at gmail.com (2018-01-16T15:31:33.006Z)
---------- Forwarded message ---------- From: Ranando King <kingmph at gmail.com> Date: Sat, Jan 13, 2018 at 2:23 PM Subject: Re: An idea to extend the functionality of Proxy objects. To: Isiah Meadows <isiahmeadows at gmail.com> While I understand what you're getting at, The invariants would *not* change under my idea. In fact, I've thought about it carefully and crafted the wording change from my suggestion specifically so that the invariants wouldn't change. My goal is simply to change this process: ``` some action on proxied target -> [[ProxyHandler]] method called -> [[ProxyHandler]] method results checked by testing against Reflect.<methods>(target...) -> error on failure -> return result ``` into ``` some action on proxied target -> [[ProxyHandler]] method called -> [[ProxyHandler]] method results checked by testing against [[ProxyHandler]].<methods>(target...) -> error on failure -> return result ``` so that the developers proxy handler implementation is solely responsible for ensuring that the invariant requirements are maintained. The <methods> in question are exactly those described by the invariants. The only thing that is changing is that [[ProxyHandler]] would be the authority for the information used to ensure that the invariants have not been violated. The gist is that while currently, given a caller, a proxy, and a target, the target constrains what the caller can do with the proxy, what I want is to reverse it so that the proxy constrains what the caller can do with the target, and all still without violating the existing invariant requirements. Does that make what I'm after a little clearer?