6 comments

[ 2.6 ms ] story [ 21.0 ms ] thread
Please note that he seems to be using the old Proxy API.
I didn't understand what was special/novel about Proxies at all.
Proxies basically paper over the numerous weaknesses in Javascript's design by exposing named hooks for things like function calls and property accesses. It's not special or novel - in a language like python the equivalent is mundane things like naming a method __add__ or __getattr__.

It's important for JS, I suppose, because without it a bunch of interesting metaprogramming techniques are impossible and you end up with inferior APIs that have worse performance characteristics. On the other hand, Proxy will probably be slow forever like all corner case JS features, so you really only win on API quality here :(

EDIT: I should mention that Proxies do have some really interesting use cases; sadly the linked post does a terrible job of illustrating any actual reason you'd want to use them.

This seems a lot like Lua metatables. I don't know why people don't just give up on JavaShit and just name Lua as EcmaScript v6. It's vastly superior in every possible way.
Normally I like having features like this in a language, but in JS I think it will be just a new tool for the "ninjas" to write crappy unmaintainable with it.