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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Advent of Haskell

5 点作者 YuukiRey超过 6 年前

1 comment

dllthomas超过 6 年前
&gt; Just remember to always add the required catch-all cases, lest you write a partial function.<p>When just unpacking lists, or other types whose structure absolutely will not change, this is fine.<p>When pattern matching on alternatives that might be added to, I find if I&#x27;m inspecting the values of existing cases I will probably want to also give consideration to how to handle future cases, so I avoid a catch-all (and make sure my tooling calls out inexhaustive matches) so these spots are surfaced when the type changes.