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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How can Higher Kinded Types help in domain driven design?

2 点作者 truth_seeker大约 6 年前

2 条评论

Benjmhart大约 6 年前
Higher kinded types create a context arlu d the types(and ultimately the values) they wrap. This can type classes which implement a the same function in different ways for the same value wrapped in a different higher kinded type, for example. So if your domain deals with values in two contexts, and you want to manipulate them using a common language, higher kinded types are a pretty great way to achieve that. They also enable parametric polymorphism, and that creates a LOT of predictable behaviours for free, which in turn allows you to automatically derive typeclasses, interfaces, and theorem proofs in certain situations.
djdjj大约 6 年前
I don’t mean to be rude, but maybe pick up a book and try to find out yourself?