Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63357 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16097 invoked from network); 12 Oct 2012 04:52:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2012 04:52:37 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.40 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.40 relay-hub204.domainlocalhost.com Received: from [74.115.204.40] ([74.115.204.40:44165] helo=relay-hub204.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/A1-06472-E02A7705 for ; Fri, 12 Oct 2012 00:52:36 -0400 Received: from MBX202.domain.local ([169.254.169.44]) by HUB204.domain.local ([192.168.68.48]) with mapi id 14.02.0283.003; Fri, 12 Oct 2012 00:51:44 -0400 To: Amaury Bouchard CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] Propety Accessors v1.1 Thread-Index: AQHNpfaE0wLAVcGGQAyyWuaNO91x4ZezPRQAgAFHrBCAAIZEgIAAE5RA Date: Fri, 12 Oct 2012 04:51:42 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B53B2@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485612B3B48@MBX202.domain.local> <5073328D.5000002@gmail.com> <50735165.8010703@aaronholmes.net> <9570D903A3BECE4092E924C2985CE485612B4353@MBX202.domain.local> <760ab4f994a78a846cf86aafda71e0e2@mohiva.com> <9570D903A3BECE4092E924C2985CE485612B4EFE@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B526F@MBX202.domain.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.25] Content-Type: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE485612B53B2MBX202domainloc_" MIME-Version: 1.0 Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE485612B53B2MBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I guess I didn't see any other support for it from others and it is a subse= t of what the RFC I am proposing would encompass, did I miss something with= your original email? From: amaury.bouchard@gmail.com [mailto:amaury.bouchard@gmail.com] On Behal= f Of Amaury Bouchard Sent: Thursday, October 11, 2012 6:42 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 You really don't want to even think about my idea? It's complementary on so= me aspects, you know. 2012/10/11 Clint Priest > Rather than go to the trouble of finding a reasonable way to hold a vote on= these issues, is there anyone against the following changes: 1) Eliminate the ability for an accessor to be called via $o->__getHours(),= the accessor functions will be completely unavailable for use except as pr= operty references ($o->Hours) 2) Change syntax to use public set($value) { }, public get(), etc. (and al= ong with that means no more "magic" $value) 2a) If possible, allow for Type Hinting... 3) Eliminate automatically implemented get; set;, no automatic backing fiel= d creation will occur. 4) read-only / write-only keywords will be eliminated 5) Exceptions thrown from accessors will be made more appropriate (I will a= lso check debug_backtrace information, etc)... If there isn't anyone against the above changes, I will make the changes to= the RFC and re-present for final agreement... Or... do ya'll want to vote on the aforementioned changes? > -----Original Message----- > From: Clint Priest [mailto:cpriest@zerocue.com] > Sent: Wednesday, October 10, 2012 7:36 PM > To: internals@lists.php.net > Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 > > Okay, I would like this to be the last time there are revisions to this R= FC. > > To sum up the last few days of conversations, I have these down as points= of contention: > > 1. Accessor functions should not be present on the object and callable d= irectly, for example, $o->__getHours() should not be > allowed. > 2. Preferred syntax for accessors should be "public set($value) { ... }"= with no "magic" $value (with possible type hinting) 3. > Automatically implemented get; set; with auto-backing field should be eli= minated as this is not necessary for PHP and is confusing > most everyone. > 4. read-only / write-only keywords, keep them or get rid of them? There= is no directly suitable replacement but I believe a private > final set() { } will take care of it, even though it much more verbose. > 5. Error handling for thrown exceptions should be made more appropriate = for accessors 6. The "truth" of reflection. Should it reveal > details internal to how PHP works on the inside or should it reflect the = way PHP presents it as options? > > Did I miss anything? > > > I will come up with some way for people to vote on the issues at hand and= we can cast our votes and be done with it, then I will > finish the project and get it out the door. > > -Clint --_000_9570D903A3BECE4092E924C2985CE485612B53B2MBX202domainloc_--