3 ms·
Golang is OOP, regardless of what some people may claim. It's just missing inheritance, which golang's implementation of composition mimics it close enough.
by gher-shyu3i 6y ago
Golang is OOP, regardless of what some people may claim. It's just missing inheritance, which golang's implementation of composition mimics it close enough.
- grey-area 6y agoComposition is not a substitute for inheritance and is used an order of magnitude less in Go code than inheritance in other languages, which touches everything.
- pjmlp 6y agoIt is close enough when coupled with delegation. That is how component based programming works.
- grey-area 6y agoThe important point is it is used far less - inheritance is impossible to get away from in most OOP programs, but you can't say the same for embedding in Go programs, it is used, but not as often.
- pjmlp 6y agoIt is only impossible because you cannot throw away standard libraries. COM/UWP have proven you don't need to have it available. They get lots of hate due to their underlying complexity, however they are the main Windows APIs since Vista, as COM took over the Longhorn vision.