|
|
|
|
|
by psychoslave
1135 days ago
|
|
I don't know for Java currently but for example in Ruby composition is simply a matter of putting your code in a module rather than a class. Then you can extend any class with this module. You can even extend instances. That is 3.extends(Some_module).method_from_some_module is perfectly valid. In PHP, surely you can use traits. |
|