News for hackers. Stuff that matters.
Re:Decorators in Go using embedded structs by yepthatsreality on Wednesday October 23, 2019 @11:13AM (#21335440)
I think this is also a good primer into golang inheritance and composition, which are major concepts in successful golang programming.
Re:Decorators in Go using embedded structs by fabianlindfors on Wednesday October 23, 2019 @11:21AM (#21335532)
Thank you :) Totally agree, I feel like embedding in Go doesn't get enough credit considering how pleasant it is to use.
Re:Decorators in Go using embedded structs by inlined on Wednesday October 23, 2019 @11:33AM (#21335678)
golang doesn’t believe inheritance is necessary. Be careful trying to put a square peg in a round hole.
Re:Decorators in Go using embedded structs by weberc2 on Wednesday October 23, 2019 @02:40PM (#21337500)
golang is right :) Seriously though, Go doesn't have inheritance and I don't miss it. The only reason I need it in Java, etc is because so many libraries expect/require you to subclass.