Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63500 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25729 invoked from network); 17 Oct 2012 11:24:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2012 11:24:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.143 smtp143.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.143] ([207.97.245.143:38832] helo=smtp143.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/49-64689-4559E705 for ; Wed, 17 Oct 2012 07:24:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp44.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 5EEA112873C; Wed, 17 Oct 2012 07:24:02 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp44.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 83A001286F6; Wed, 17 Oct 2012 07:24:01 -0400 (EDT) Message-ID: <507E9550.8070602@sugarcrm.com> Date: Wed, 17 Oct 2012 14:24:00 +0300 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Nikita Popov CC: Clint Priest , PHP Internals References: <9570D903A3BECE4092E924C2985CE485612B53E4@MBX202.domain.local> <507D24E0.9070203@sugarcrm.com> <9570D903A3BECE4092E924C2985CE485612B6DC9@MBX202.domain.local> <507D5199.3090203@sugarcrm.com> <9570D903A3BECE4092E924C2985CE485612B6F1D@MBX202.domain.local> <507D6675.3080206@sugarcrm.com> <9570D903A3BECE4092E924C2985CE485612B7805@MBX202.domain.local> <507E846A.2030805@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > You have already written seven mails all saying how much complexity > this would introduce. Could you maybe elaborate a bit on that? How > would it make anything more complex? I mean, the only really Any code that deals with methods would now have to consider - is this regular method or special "uncallable" method? Can I call it? Can I list it in the list of class methods? This leads to weird situation where current method may not be callable and may not be found by reflection on $this. And all inheritance functions will have to consider them separately from all other methods, etc. And interface implementation has to be changed to account for existence of not-quite-methods. And so have traits. Etc., etc. Even conceptually, you need to be aware that there are methods of class and then there are non-methods which look exactly like methods in almost every aspect but aren't. This adds complexity and inconsistency - for no benefit whatsoever (I do not consider being not able to call __get* benefit since I see no use case for this requirement). I want to keep this simple - accessors are fine if they just produce a set of methods, everybody knows what PHP methods are and how they work, there would be just couple of more entries in function table, simple enough and every other part of the engine knows how to take care of such thing. But if they introduce a complexity of methods-that-aren't-quite-methods and live in a limbo outside of class table even though they work as methods, except in cases where they don't - I'd really rather go back to old trusty __get then - at least it is clear how that works and you don't have to deal with special cases and exceptions on every turn. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227