KevBurnsJr

The L in SOLID

Oct 21st, 2019

SOLID is a set of design principles from the world of object oriented programming that translate well to many languages.

Personally I had trouble initially understanding the Liskov Substitution Principle and its significance until I recently ran into a perfect example of what can go wrong when it is violated.

You can read all about it in this Issue on Github.
https://github.com/kevburnsjr/microcache/issues/10

After publishing these findings, I submitted a PR to NewRelic's Go Agent to address the violation and they agreed. The upstream PR was merged and documentation updated to discourage optional interface type casting as a means of transaction retrieval.
https://github.com/newrelic/go-agent/pull/105

New Relic Go Agent documentation encourages users to violate the Liskov Substitution Principle (github.com)