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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Douglas Crockford, for JavaScript: The Good Parts

10 点作者 mcantor超过 12 年前

1 comment

user24超过 12 年前
This article isn't put across in a very balanced way. In fact I cut short my response when you said "Fuck you Douglas" because my hopes of receiving a civil reply evaporated. Anyway;<p>&#62; I say we have a reasonable expectation that people writing code that does financial calculations have a fucking clue as to how their math will work on a computer.<p>No we don't.<p>&#62; He goes on to suggest that the right way to handle this is by scaling your values to be in cents (or whatever quanta you happen to care about). It's interesting to see DSP-world fixed point evangelism suddenly materialize in JavaScript. Be warned: unless you heavily wrap this scaled approach in objects, you will make a mistake somewhere.<p>What? It's more likely you'll make a mistake dealing in whole cents than doing floating point math? Really?