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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Techniques for Duck Typing Ruby's Core Objects

12 点作者 sandal将近 16 年前

1 comment

aaronblohowiak将近 16 年前
Title is misleading. What I see presented in the article is a single technique, "implement the same interface." What I expected instead was to see methods for getting ruby core objects to present themselves as more complex objects or so on. In that case, I'd expect to see references to SimpleDelegate, Forwardable, duping the metaclass, extending the singleton class of the instantiated objects and so forth.
评论 #649895 未加载