# Reducing Type Hierarchies

DevFeed: [Reducing Type Hierarchies](<https://devfeed.tech/articles/reducing-type-hierarchies-22116.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2016/10/reducing-type-hierarchies.html>)

Published: 2016-10-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>)

## AI overview

A tutorial explains why traditional type hierarchies are not always the best pattern in Go. It recommends grouping concrete types by common behavior, using interfaces to decouple them, and applying composition and type-declaration guidelines.

## Source excerpt

Introduction I see a lot of developers coming to Go from object oriented programming languages such as C# and Java. Because these developers have been trained to use type hierarchies, it makes sense for them to use this same pattern in Go. However, there are aspects of Go that don't allow type hierarchies to provide the same level of functionality they do in other object oriented programming languages. Specifically, the concepts of base types and subtyping don't exist in Go so type reuse requires a different way of thinking.