Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Composition
- There are two kinds of composition - object composition and function composition:
- * object composition - way of combining simple objects into complex ones.
- * function composition - way of combining simple functions to build more complicated ones.
- ## Why composition is better than inheritance?
- It doesn't encourage developers to build large object heritage, so applications aren't complex like enterprise Java apps.
- We limit the future predition to minimum.
- ## Why composition isn't always the best way of building software?
- The Functional Programming (FP) is deeply dived in computer science. It means to develop great project using FP,
- the company needs to hire very good programmers, very likely post-grads from Math subjects / univerisities.
- It's much harder than the Object-oriented programming (OOP), because the OOP abstract applied math of the programming,
- so the barrier of knowledge is much lower (in the OOP).
- It's important to understand who's going to build the application in the long-run?
- If company has access only to junior devs, probably the OOP will be a better option than FP.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement