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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Death by Duck-Typing

3 点作者 abscondment大约 15 年前

2 条评论

telemachos大约 15 年前
I'm not sure I follow the argument (or agree with where the author places the blame).<p>Notwithstanding Ruby's handling of type safety or its implementation of arrays, isn't it my job (as the programmer) to know what kind of object I'm getting from the helper library? That is, when I get 'h' (in his example), the black box is how 'h' gets filled, not <i>what kind of collection object it is</i>.<p>Or am I confused?
评论 #1146319 未加载
评论 #1147574 未加载
dangrossman大约 15 年前
Be glad arrays in PHP are implemented internally as hash maps, so the average inexperienced web developer doesn't run into issues like these.