Re:Half a million lines of Go
by vips7L on Monday May 17, 2021 @09:26AM
(#27183108)
Do you really want to inherit all the functions of Collection? Isn't this the anti-pattern everyone complains about on inheritance vs composition? This just looks like it's confused about whether it is a collection or has a collection.
Personally, I'd just rather take a collection by composition and only expose the small part of the API I actually want.
I guess though this is the standard decorator pattern you'd normally see from GoF.
Personally, I'd just rather take a collection by composition and only expose the small part of the API I actually want.
I guess though this is the standard decorator pattern you'd normally see from GoF.