Hi! > I've used this in other places, it's basically lightweight traits, and > has always been perfectly valid code. There does not seem to be a clear > justification for deprecating it other than, It's not the way 'some' > people like code to work...
Well, I think the reason is that this code is unsafe and goes against the principles of OO. I understand that there's a tendency to use OO as a neat way to namespace global functions and autoload them, but that's not how it is supposed to work. If addPreserveText() uses anything from Footer, it should not be called from TextRun, but if it does not, it should be in Section. I certainly disagree that the code that calls method of Footer from TextRun is "easy to follow" - I'd be very surprised seeing such code and would immediately think it's some kind of bad copy-paste from one class to another. I understand that this hack works for you - but language usually enforce some rules of what you can and can not do, according to some guiding principles. Having this hack goes again those principles. As far as I know, no OO languages allow to do such things. I note that we have people here constantly criticizing us for not changing the names of all functions in order to satisfy their esthetic sense, but once we change something that obviously for nearly everybody (see vote) shouldn't even be there and never was intended to work this way - we get criticized again for breaking stuff :) -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php