note 120043 deleted from language.oop5.traits by cmb

From: Date: Sun, 01 Dec 2019 08:55:01 +0000
Subject: note 120043 deleted from language.oop5.traits by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213330@lists.php.net to get a copy of this message
Note Submitter: bagermen at gmail dot com ---- Traits effectively replaced by OOP patterns: DI and Decorator. Traits broke OOP. Exapmle: Let we have an object with one method. Creator of the class used traits to overload that method. We write client code. So there is no way to know what this object do with that method because the same class with different traits in it will do different things. It's evident that traits are evil in your code try to use OOP instead of them

« previous php.notes (#213330) next »