# Object Oriented Programming Mechanics

DevFeed: [Object Oriented Programming Mechanics](<https://devfeed.tech/articles/object-oriented-programming-mechanics-22111.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2015/03/object-oriented-programming-mechanics.html>)

Published: 2015-03-15T00: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>), [Programming](<https://devfeed.tech/topics/programming.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [embedding](<https://devfeed.tech/tags/embedding.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [programming](<https://devfeed.tech/tags/programming.md>), [types](<https://devfeed.tech/tags/types.md>), [video](<https://devfeed.tech/tags/video.md>)

## AI overview

This video tutorial explains how object-oriented programming practices can be applied in Go. It covers methods, interfaces for polymorphic behavior, type embedding for extending state and behavior, and visibility-based encapsulation.

## Source excerpt

Go is an object oriented programming language. It may not have inheritance, but in this 20 minute video from the Bangalore meetup, I will show you how object oriented programming practices and techniques can be applied to your Go programs. From an object oriented standpoint, Go does provides the ability to add behavior to your types via methods, allows you to implement polymorphic behavior via interfaces and gives you a way to extend the state and behavior of any existing type via type embedding. Go also provides a form of encapsulation that allows your types, including their fields and methods, to be visible or invisible. Everything you need to write object oriented programs is available in Go. Example 1 - Methods: External resource on play.golang.org: http://play.golang.org/p/hfRkC6nKag Example 2 - Interfaces: External resource on play.golang.org: http://play.golang.org/p/F1UyKlTh3k Example 3 - Extending Types: External resource on play.golang.org: http://play.golang.org/p/JJ811lBwoz Example 4 - Overriding Inner Types: External resource on play.golang.org: http://play.golang.org/p/-xQFBv9_82