Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Open/closed principle

The open/closed principle was coined by Bertrand Meyer [24], who stated the following:

"A software module should be open for extension but closed for modification."

Almost all Go programs import and use types from a host of other packages, some being part of the Go standard library whereas other packages are provided by third parties. Any software engineer that imports a package into their code base should always safely assume that all the types that are exported by said package adhere to a contract that is guaranteed to be immutable. In other words, a package should not be able to modify the behavior of the types that are exported by other packages. While some programming languages allow this type of modification (via ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content