Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 Membranes 的翻译 #30

Open
qiulang opened this issue Jul 5, 2021 · 0 comments
Open

关于 Membranes 的翻译 #30

qiulang opened this issue Jul 5, 2021 · 0 comments

Comments

@qiulang
Copy link

qiulang commented Jul 5, 2021

Membranes 是ES6比较隐晦概念,个人感觉到现在也没几个人懂。我也一直没搞懂。中文文献里我也没看过对它的翻译,把它翻译成 隔离层 是不是妥当我不知道,但最好增加下说明。

比如这段 Proxies and WeakMaps were designed, and initially motivated, to support the creation of membranes. Proxies used standalone cannot be transparent, and cannot reasonably approximate transparency. Membranes come reasonably close to transparently emulating a realm boundary. For classes with private members, the emulation is essentially perfect. 本身就比较难懂晦涩了 ,翻译它就难上难。

Proxy 和 WeakMap 的最初设计动机,是支持隔离层的创建。单独使用的 proxy 不可能是透明的,也不能合理地达到接近透明的程度。隔离层能合理且几乎透明地模拟 realm 的边界。对于具备私有成员的类而言,这种模拟基本上是完美的。

另 关于 Membranes 我自己看的比较好理解文档是这篇 What is a membrane?

This wrap-unwrap behavior is precisely what a membrane is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant