Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61882 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89384 invoked from network); 30 Jul 2012 19:12:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2012 19:12:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=truth@proposaltech.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=truth@proposaltech.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain proposaltech.com does not designate 66.94.237.66 as permitted sender) X-PHP-List-Original-Sender: truth@proposaltech.com X-Host-Fingerprint: 66.94.237.66 nm2-vm0.access.bullet.mail.mud.yahoo.com Received: from [66.94.237.66] ([66.94.237.66:40978] helo=nm2-vm0.access.bullet.mail.mud.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/74-00342-38CD6105 for ; Mon, 30 Jul 2012 15:12:05 -0400 Received: from [66.94.237.194] by nm2.access.bullet.mail.mud.yahoo.com with NNFMP; 30 Jul 2012 19:12:00 -0000 Received: from [98.139.221.50] by tm5.access.bullet.mail.mud.yahoo.com with NNFMP; 30 Jul 2012 19:12:00 -0000 Received: from [127.0.0.1] by smtp103.sbc.mail.bf1.yahoo.com with NNFMP; 30 Jul 2012 19:12:00 -0000 X-Yahoo-Newman-Id: 605468.55073.bm@smtp103.sbc.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sTFN6BgVM1lhfCSL8qi6J7neSA3qnaiPzrxojfk6eNVE.TK mVBwC0iK1h_r.Y80F0yHRjncPun9fOGD2pQ9fliGgJIEFxCLYdAerKu0GimA b7._HZlmgv.b7t4CEguJRJEtWDxz.UXd8wMUbOUjFfFWrSvk.shK8OgysiOF _Ue_S9jjwC_dVpvBlXAglcIPJO3jykncPXR_e5NM_l2UPHW70j2ONtZ2risk NrV8Jf3gI5di9lFipIDk3E48rN1iT4LJP.Vq0B9U.F0piBa2KGQIiluPlFnh 9dknpsJY2PGIhu.9b3akDXwlhYPcJE3GHCfQd5fU1ABnJZnOUf4ystJCH50y OuxdTFq_1TKWdbi36atccEFfRNQSDWwClryH2FNwY3Gfjf9.Blgp45DHz1WB GSNwjCXaFFa.5gAuGgmJeQR8JguCEK8REKS4USKDIB225GZcsvZJx0yeQSW8 xv3cxdSSFoM6mIpKLgnj8wzpenRo9qiUMjP3IuLxzATgjGSeOcgNPGl37GgY HujX0kiGtB1dSn5yRqOj3oimhlA-- X-Yahoo-SMTP: jWG9jiaswBBOCHlPTWD9zJWRnNyiDJE- Received: from [192.168.2.102] (truth@70.230.202.174 with login) by smtp103.sbc.mail.bf1.yahoo.com with SMTP; 30 Jul 2012 12:12:00 -0700 PDT To: "internals@lists.php.net" In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" Date: Mon, 30 Jul 2012 12:11:58 -0700 Message-ID: <1343675518.12438.84.camel@inspiron> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Remove calls with incompatible Context From: truth@proposaltech.com (Todd Ruth) On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote: > https://wiki.php.net/rfc/incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. > > -- > Gustavo Lopes I'm just a user, but I'd like to beg that the feature not be removed, at least not without having an ini setting for at least a couple of years. As the RFC states, "This feature can, however, be used to implement trait-like behavior, and I'm sure someone somewhere did such a thing." I know in our company's code, such uses were frequent. I believe they are still common. Refactoring often doesn't fit the schedule. I doubt we're unusual in allowing classes to do more than they should instead of separating code off into a trait or making other high level changes. Note that traits have only been available since March 1, 2012 (php 5.4.0). I don't think axing register globals is very relevant. Perhaps after traits have been available for several years the comparison would be better. With register globals, a good alternative (the $_ variables) have been around for many years. With traits, a good alternative has been around for a few months. I think the point of mentioning register globals is just to say "We've made huge BC breaks before." That doesn't make it less painful. Off-topic, but to show a potentially higher priority... If you want to get rid of class related WTF, please put get_class() back to the way it used to be. Right now, calling get_class() with a variable that is null is the same as calling get_class with no arguments. I can imagine why that might be convenient for the implementation, but it is terribly confusing. Thanks for listening. - Todd