Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Is it possible to enable EcmaScript 6 Harmony Proxies in nodejs? If so, what are the pros and cons? And is there any documentation on how to use them? Thanks !

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
366 views
Welcome To Ask or Share your Answers For Others

1 Answer

Invoking node with node --harmony-proxies should do the trick.

Pros: proxies are a very powerful feature when you really need them.

Cons: proxies are a much too powerful feature when you don't need them (which should be most of the time). Also, the implementation should still be regarded experimental.

As for documentation, all there really is atm is the Harmony wiki, in particular this page, which reflects the current implementation of proxies in V8 (and thus node):

http://wiki.ecmascript.org/doku.php?id=harmony:proxies


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...