News for hackers. Stuff that matters.
Re:Metaprogramming with ECMAScript 6 proxies by Offler on Wednesday December 10, 2014 @03:15PM (#8731401)
Getters have been in JS since ES5 and can do what you just wrote. Obv Proxy is more powerful/has more traps.
Re:Metaprogramming with ECMAScript 6 proxies by rauschma on Thursday December 11, 2014 @12:16PM (#8735883)
Not completely: with getters, you have to decide on a specific set of properties, the proxy GET trap intercepts all get operations. But I agree that you don’t always need proxies.