Brent 7/6/2023

"Is A" or "Acts As"

Read Original

The article argues for the use of interface default methods in PHP by distinguishing between two types of object relations: the classic 'Is A' relation (contract) and the 'Acts As' relation (behavior). Using the PSR-3 LoggerInterface as an example, it explains how default methods can eliminate boilerplate code for convenience methods, making a case for their practical necessity in modern software development.

"Is A" or "Acts As"

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser