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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Living Inside Your Own Black Box

18 点作者 khingebjerg大约 15 年前

2 条评论

michniewski大约 15 年前
Treating your program as a black box with set of inputs and outputs to avoid library reliance is useful. As mentioned, it increases portability, eases maintenance and future revision. One downside however might be not taking full advantage of library implementation details for performance concerns. Anyway, this sounds like a case for building for interfaces or abstractions, and the same arguments apply. I would agree though that this is a good approach to take in general.
delluminatus大约 15 年前
I tried doing this when learning Haskell, to minimize any connection to monads. For whatever reason, 'twasn't easy.<p>Then I tried it with Clojure, even though I don't have to, and it seemed a lot simpler. Just pass a map around with all the data in it, or whatever.