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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Design better software abstractions using bipartite composition (2019)

12 点作者 dmarto大约 1 年前

4 条评论

jprete大约 1 年前
I've done this myself implicitly when trying to break down kitchen-sink classes. Often they were never really one class to begin with, so a lot of the contents can be separated into two or more new classes such that there are only a small number of dependencies between them.
turkey99大约 1 年前
So the opposite of encapsulation?
评论 #39698929 未加载
xtiansimon大约 1 年前
“We can use composition to break our ship object into two concepts.”<p>SHIP : PHYSICAL OBJECT<p>On the surface this appears very “semiotic”
golyi大约 1 年前
This feels unnecessarily fragmented and complex.<p>Sorry don&#x27;t see the benefits of designing your classes in this fashion.