Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88629 invoked from network); 26 Oct 2012 23:37:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2012 23:37:15 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:47452] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/06-51104-AAE1B805 for ; Fri, 26 Oct 2012 19:37:15 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp6.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 28F642706DD; Fri, 26 Oct 2012 19:37:12 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp6.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A1FC5270674; Fri, 26 Oct 2012 19:37:10 -0400 (EDT) Message-ID: <508B1EA2.8060203@sugarcrm.com> Date: Sat, 27 Oct 2012 01:37:06 +0200 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Nikita Popov CC: Clint Priest , PHP Developers Mailing List References: <508A67E6.2000405@zerocue.com> <508A9AC9.50200@sugarcrm.com> <508AF3E7.7020004@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Stas, if you define an accessor, how do you define it? Do you say Either way, doesn't matter. > According to the current proposal at least you can write the first > code *and the first code only*. If you write the second code then you That's where I think it is wrong. It would be much simpler and consistent with existing PHP if it were a natural extension of __get instead of a completely new and foreign concept. > special behavior for properties. You probably won't start off with > telling them that this declaration is automatically converted to a set > of __getFoo methods which are registered as handlers for the accessor. > I really don't see how going into details like __getFoo makes anything > easier. Depending on your purpose and background. If you know how __get works, extrapolating to __getFoo is trivial. Getting special syntax that produces __getFoo from this is also trivial. Getting the concept of methods that are not quite methods and get called only through special intercept mechanism and have special backtrace rewriting engine and reflection hiding patches so you can be inside the method that officially does not exist - not so trivial. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227