FAQ

On Saturday, 16 April 2016 07:29:54 UTC+3, Henry wrote:
Hi,

I am stumped with a problem that is typically solved with a classic
inheritance in a proper OO language. I have several classes that have
common instance variables and methods. These classes are similar enough to
allow a base class to be extracted out of them and it logically make sense
to do so. Here is my attempt to solve it in Go.
First, what is the actual problem you are solving? There are tons of
different ways of solving things and all constrained by their actual
context. It's very difficult to provide suggestions based on facilitated or
abstract examples.

First suggestion, don't try to emulate inheritance. *I have yet to see a
significant improvement on design from using inheritance, and I have
searched through tons of examples and materials, the closest one was how
Aggregate was implemented in CQRS, however I suspect there is a better
design via proper language support for Aggregates.*

+ Egon

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 13 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 16, '16 at 4:30a
activeApr 16, '16 at 5:22p
posts13
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase