TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Meta-programming JavaScript Using Proxies

38 点作者 gdi2290超过 11 年前

4 条评论

pselbert超过 11 年前
I recently wrote about a great, and very simple, use case for JS Proxies [1]. They are the cleanest way to implement the mediator pattern in JS, which has some great uses in MVC.<p>[1]: <a href="http://blog.sorentwo.com/2013/12/06/presenting-by-proxy.html" rel="nofollow">http:&#x2F;&#x2F;blog.sorentwo.com&#x2F;2013&#x2F;12&#x2F;06&#x2F;presenting-by-proxy.html</a>
evilpie超过 11 年前
Please note that he seems to be using the old Proxy API.
voidr超过 11 年前
Normally I like having features like this in a language, but in JS I think it will be just a new tool for the &quot;ninjas&quot; to write crappy unmaintainable with it.
zmanian超过 11 年前
I didn&#x27;t understand what was special&#x2F;novel about Proxies at all.
评论 #6993962 未加载