TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Introducing PEAR, the functional SOLID

2 pointsby dshackerabout 7 years ago

1 comment

al2o3crabout 7 years ago
<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;.