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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

My Perception of CoffeeScript

6 点作者 pkananen超过 13 年前

1 comment

allertonm超过 13 年前
ISTM the author's "pure javascript" version of the horse/snake example is not solving the same problem as the CoffeeScript one.<p>In the CS code, the association between the object and it's type of motion (galloping/slithering) is made at construction time (via the implementation of "move" associated with the object), and in the "pure javascript" code it is made at the call site for "move".<p>This seems like such a fundamental difference that it becomes a little difficult to take the rest of the argument seriously.