TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Design better software abstractions using bipartite composition (2019)

12 pointsby dmartoabout 1 year ago

4 comments

jpreteabout 1 year ago
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.
turkey99about 1 year ago
So the opposite of encapsulation?
评论 #39698929 未加载
xtiansimonabout 1 year ago
“We can use composition to break our ship object into two concepts.”<p>SHIP : PHYSICAL OBJECT<p>On the surface this appears very “semiotic”
golyiabout 1 year ago
This feels unnecessarily fragmented and complex.<p>Sorry don&#x27;t see the benefits of designing your classes in this fashion.