News for hackers. Stuff that matters.
Re:The ups of downs of porting 50k lines of C++ to Go by stcredzero on Saturday March 07, 2015 @12:48PM (#9162446)
No inheritance. I’ve personally come to view inheritance-based OO as somewhat of an antipattern in many cases, bloating and obscuring code for little benefit

So everywhere you would use inheritance, you use composition instead? The stuff you'd have stuck in the superclass, you stick somewhere else and stick in your struct?

Re:The ups of downs of porting 50k lines of C++ to Go by autarch on Saturday March 07, 2015 @01:24PM (#9162550)
> So everywhere you would use inheritance, you use composition instead? The stuff you'd have stuck in the superclass, you stick somewhere else and stick in your struct?

No, Go provides interfaces (aka traits or roles), which you can use to share composable functions (aka methods).

Re:The ups of downs of porting 50k lines of C++ to Go by stcredzero on Saturday March 07, 2015 @06:36PM (#9163585)
No, Go provides interfaces (aka traits or roles), which you can use to share composable functions (aka methods).

I wasn't talking about creating conventions/apis/facades, rather about how one reuses code.