Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63655 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76343 invoked from network); 26 Oct 2012 20:18:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2012 20:18:08 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:52282] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/54-51104-FFFEA805 for ; Fri, 26 Oct 2012 16:18:08 -0400 Received: by mail-vc0-f170.google.com with SMTP id fo14so3726312vcb.29 for ; Fri, 26 Oct 2012 13:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TzZn6Y3LWeVrOBAEKkZfq20YdXwo3zl6DMe1rheu550=; b=d9cQv7pE0pZQzwT0Hlso2Vbltofdri6/EREnMP/KczQi5mCa6/now59h9DfiyOYhrl Ilo4FJuxlL1R10ZiihAMoAVYkJJPyH3oszBBDaqNMXTRb/6X4ZOg0Qt8SVd2YMN9e8wi lyJSdGuiZuDmPD/5HxOKn77gAwKi5W+HjBouswB7au/bKnt2JoqrKMCvBlF+WPHlf62t oG1cmbWjKL6A4Yd6rJpel0pQIeTVk3fQp63l1adTgwRaNWRIGfmXws6LQg79oGORK9CN hyujc/thvcNGMA7M5ckKNqI9gt+0Zvw7OFurkqAy2TCzXNi0fgXstHHzBxz1do2uK25K mm9g== MIME-Version: 1.0 Received: by 10.58.2.104 with SMTP id 8mr42505131vet.48.1351282684342; Fri, 26 Oct 2012 13:18:04 -0700 (PDT) Received: by 10.58.161.70 with HTTP; Fri, 26 Oct 2012 13:18:04 -0700 (PDT) In-Reply-To: <508A9AC9.50200@sugarcrm.com> References: <508A67E6.2000405@zerocue.com> <508A9AC9.50200@sugarcrm.com> Date: Fri, 26 Oct 2012 22:18:04 +0200 Message-ID: To: Stas Malyshev Cc: Clint Priest , PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: nikita.ppv@gmail.com (Nikita Popov) On Fri, Oct 26, 2012 at 4:14 PM, Stas Malyshev wrote: > Hi! > >> Some people are in favor of the internal functions being generated by an >> accessor declaration should be invisible and non-callable directly. >> Others are in favor of leaving them visible and callable. > > I think these types are not right. It has nothing to do with > internals/userland, it has to do with wanting more magic that work is a > complex way while allowing user no knowledge and control over what's > going on, or reduced number of simple concepts that interact in a > variety of ways. I think you are presenting the situation inaccurately. This has nothing to do with complex magic and also does not intend to limit the users control. Actually, both approaches are exactly the same, the only difference is whether we additionally put the accessor function into the method table or whether we do not. I still fail to see where you see complexity come into the picture. You have mentioned inheritance checking, but from what I see the functions doing the inheritance check take generic zend_function*s, so they wouldn't have a problem dealing with code not in the method table. The same applies to pretty much everything else too. After all, there *is* a reason why we have abstractions in the engine ;) To me the situation is as simple as this: I declared a get accessor for $foo. I did not declare the method __getfoo(). So why is that method there? It seems really pointless, counter-intuitive and hacky to me to automatically create methods that do not actually exist (not under that name at least). Nikita