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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Inheritance as Antipattern

6 点作者 Jebdm超过 16 年前

1 comment

jganetsk超过 16 年前
This is why ML and Haskell can be highly advanced languages without inheritance. Subtyping, by the way, is evil in the type theories (causes more problems than benefits, really)... and so it's no surprise that inheritance sucks in practice.<p>Yes, nitpickers will point out that Ocaml has objects. No one uses them. Also, Haskell has "class extension" for type classes. But, that's much closer to the "composition" that Joshua Bloch talks about in his book than true inheritance.