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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

From Haskell to Java: modeling your problem domain with types

38 点作者 rowborg超过 8 年前

4 条评论

thedudemabry超过 8 年前
Neat article! Coming from a Haskell background in my first post-college job, I also modeled several problems using Haskell types and later translated them into C++.<p>It felt a little silly at first, but really did help clarify my understanding of the problem domain and let me play around with composing and operating on data structures very quickly in an interactive REPL. Once I was happy with the data structures and had a good understanding of the most complicated operations over them, it was a simple task to build the analogous C++ classes.
crb002超过 8 年前
I used this on a project. Had a complex business logic I rewrote from Java to Haskell so we could understand the edge cases. Worked out great. Don&#x27;t be shy about using Haskell as a specification language.
tdb7893超过 8 年前
It&#x27;s an interesting idea, but the example is essentially an implementation of the visitor pattern so make sure that is really what you want before following suit.
nudpiedo超过 8 年前
This post was really good, it proves the point of learning an esoteric language and skills for a mainstream technology. I wish I could read more posts like this one.