Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has anyone used ECMAScript Proxies yet?

I am trying to get a hang of ESx (Harmony?) Proxies. I think I know the basics now, but I don't think I'm capable of taking advantage of them.

Has anyone managed to use them for any good? I don't know any library or whatsoever that has done that.

like image 568
Tower Avatar asked Apr 22 '11 11:04

Tower


1 Answers

Proxies are a rather strategic feature that is primarily intended for implementing bindings or advanced library abstractions. Don't worry if you don't see an immediate use case for your own code. In fact, if you did, you should think at least twice before using them -- more often than not they are overkill, and there is a simpler and more efficient way to achieve the same thing.

There are a couple of examples on the original proposal page: http://wiki.ecmascript.org/doku.php?id=harmony:proxies

like image 169
Andreas Rossberg Avatar answered Oct 21 '22 17:10

Andreas Rossberg