note 120043 added to language.oop5.traits

From: Date: Fri, 14 Oct 2016 07:12:58 +0000
Subject: note 120043 added to language.oop5.traits
Groups: php.notes 
Request: Send a blank email to php-notes+get-206890@lists.php.net to get a copy of this message
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 ---- Server IP: 72.52.91.14 Probable Submitter: 95.53.170.61 ---- Manual Page -- http://php.net/manual/en/language.oop5.traits.php Edit -- https://master.php.net/note/edit/120043 Del: integrated -- https://master.php.net/note/delete/120043/integrated Del: useless -- https://master.php.net/note/delete/120043/useless Del: bad code -- https://master.php.net/note/delete/120043/bad+code Del: spam -- https://master.php.net/note/delete/120043/spam Del: non-english -- https://master.php.net/note/delete/120043/non-english Del: in docs -- https://master.php.net/note/delete/120043/in+docs Del: other reasons-- https://master.php.net/note/delete/120043 Reject -- https://master.php.net/note/reject/120043 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206890) next »