Jason Warner
Jun 11, 2021

--

This is an excellent point. A similar situation could happen using traditional inheritance models too. You have made an excellent argument for code reviews and automated code testing. With proper code auditing in place, changes like these are caught before they break anything.

I'm not arguing that this is a silver bullet. I am saying that it is trivial to conform to an interface. I will say that in my experience composition leads to better abstraction and easier to maintain code. That is why I recommend it whether you are using functional or object oriented approaches.

--

--

Jason Warner
Jason Warner

Written by Jason Warner

I enjoy everything related to code and being a dev. However, my only skills are showing up and being lucky and I'm not sure if luck is a talent.

No responses yet