Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22526 invoked from network); 14 Nov 2012 15:35:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2012 15:35:37 -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.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-la0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:64268] helo=mail-la0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/B1-10194-74AB3A05 for ; Wed, 14 Nov 2012 10:35:36 -0500 Received: by mail-la0-f42.google.com with SMTP id s15so456283lag.29 for ; Wed, 14 Nov 2012 07:35:31 -0800 (PST) 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=tZsoGXTimGMJzJ/RYdcsgabQOp8MN1f2qvcnkmsYDxA=; b=agTYltv/gA7UIYGKz4W3mZg+Yta8ySEOhaxGocYv+wG1ailv8bAL71SnSFyvt2wCyj hXunVZuTHqVH5KSFt6qdM94ijU3Y2WTAkV30z9FoK2s2FfixlPAoD4cVwAx64QBSINVq SBY6k6DI3prPY1YPgx8prXyRkeYkz0bghCwrXef7uLSbKl2jL95rW6zKYjZnaBJD7FDB c1ndNWu425nnchohjZV7IDJDbPd1T6e4EHdq+lzbbM3LGP0Npf1YPgqPjdlTRwEkF0Ha whdzlDxB5m0CSRryjM5Kc6QuwF8sKXuPRSl3qTT1IpMxhZbmexYaz8RS1KhVDxeCpFfR V5Ug== MIME-Version: 1.0 Received: by 10.152.106.162 with SMTP id gv2mr24861875lab.14.1352907331708; Wed, 14 Nov 2012 07:35:31 -0800 (PST) Received: by 10.112.83.100 with HTTP; Wed, 14 Nov 2012 07:35:31 -0800 (PST) In-Reply-To: <50A39C58.6030501@zerocue.com> References: <508A67E6.2000405@zerocue.com> <50A39C58.6030501@zerocue.com> Date: Wed, 14 Nov 2012 16:35:31 +0100 Message-ID: To: Clint Priest Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=f46d04083aa5eba51504ce7648e7 Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: nikita.ppv@gmail.com (Nikita Popov) --f46d04083aa5eba51504ce7648e7 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 14, 2012 at 2:27 PM, Clint Priest wrote: > Been AWOL for a while and getting back to this, doesn't seem like any > resolution has occurred, just the conversation has died down. > I got the feeling that in the last few mails we actually made some progress and some people agreed with me that __magic accessor methods and a dedicated syntax for them are not combinable semantically. Maybe I got that wrong :/ I would propose that: > > 1) Internal accessor methods that are defined are callable directly. > 2) Said methods are not reflected or revealed by the engine (stack traces, > reflection, etc would hide the engines implementation details) > > I think that with the above, #1 makes it easy as no further changes are > required to make that happen, they're already directly callable The current implementation just uses the __ methods internally, but they are not actually magic accessor methods. That's not what Stas wants (as far as I understood). So you would still have to change the implementation to make them true magic methods which can be used independently from the special accessor syntax. and #2 jives with what *most userland programmers* would expect. > So with your current plan we would end up with this: a) A dedicated accessors syntax b) which internally stores the accessors as methods with special names c) but those methods are not magic methods, so you can't get the same behavior by defining them directly d) and the methods are hidden from the user e) but he can still call them (even though they don't exist if he asks for them in reflection). All this sounds very odd to me. Nikita :) --f46d04083aa5eba51504ce7648e7--