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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Introducing PEAR, the functional SOLID

2 点作者 dshacker大约 7 年前

1 comment

al2o3cr大约 7 年前
<p><pre><code> This guarantees that your software isn&#x27;t going to crash because of an unhandled exception, and allows you to think in different ways. </code></pre> OTOH, it also means that if you mess up in one spot - for instance, passing an array of things you thought were numbers but were actually characters to `sum` - you don&#x27;t get any indication there&#x27;s a problem until later when the result is used.<p>See also most every time someone thinks, &quot;I won&#x27;t raise here, I&#x27;ll just return nil&quot;.