How to explicitly declare that a struct implements an interface in Go

rules to follow

One of the things I love about Go and find to be a strong supporter of serendipitous interface standardization is Go’s implicitly declared interfaces. However, there are times you really, really want to explicitly declare an interface, such as when you have a larger interface and you want your IDE and/or the compiler to tell …

PHP delegation vs. GoLang type embedding

Composition

PHP implements composition (vs. inheritance) of object class properties and methods to other classes using delegation. Go on the other hand implements composition with type embedding. Read this post to learn about the differences and to appreciate the benefits of Go’s approach compared to that of PHP.

GoLang Strict Typing and Interface Slices

Slices

Photo by Louise Lyshøj on Unsplash This is a GoLang Experience Report. …but you cannot define the rows parameter as type []RowInserter because []interface{} won’t match it, even though RowInserter is itself an interface. Background I am relatively new to programming Go, but I have been developing software professionally in a variety of programming languages …

Practical Object-Oriented Programming for WordPress Developers: A Tutorial Series

Goals of this Tutorial Welcome to this ongoing series whose goal is to teach Object Oriented Programming to WordPress developers. This series will teach you in a unique manner compared to traditional tutorials on OOP and based on my several decades of instructional experience. Using this approach it I believe it will be easier for …