Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63355 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88246 invoked from network); 11 Oct 2012 23:41:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2012 23:41:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=amaury.bouchard@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=amaury.bouchard@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: amaury.bouchard@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:60188] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/B9-32023-44957705 for ; Thu, 11 Oct 2012 19:41:57 -0400 Received: by mail-ob0-f170.google.com with SMTP id ni5so2597378obc.29 for ; Thu, 11 Oct 2012 16:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yK/ELQEYlf9cvDsNisbD8qPft1Fb4lKmm6cTJezFIek=; b=xTUrWMs/BUEqUN1Y8dY6Yr2nwiSnHSPARL0BlXNbuoOpXPCG3gK6r5CfeHR43VlR3J NS/gaFomo5SHM6Bh4MbhGhxisDwiTM+DoseDrHU7LCJ6oxMfmQZwPCxlD1V0bu9jEK5Q 44pQUKs1AzSdmqyU1P31thQtOszBVjdVVxzcAtSKqt2L++j4h/43nQxN3DmcT0a5cqvQ 3Q2ENA9hbGJnoVOrwvrkp0x8XtRXNvETAPS0kx4AwkH9C5lpVRKZivm41ERJv9h4EIwL /eAaB210h5cT0Sz7KGQ9fs/hX/peAgu8PfTb+s5mhm/k2i5XtouNWsU1SkD7weiYh5Aw XI9Q== Received: by 10.182.50.103 with SMTP id b7mr2171946obo.15.1349998913989; Thu, 11 Oct 2012 16:41:53 -0700 (PDT) MIME-Version: 1.0 Sender: amaury.bouchard@gmail.com Received: by 10.182.24.169 with HTTP; Thu, 11 Oct 2012 16:41:33 -0700 (PDT) In-Reply-To: <9570D903A3BECE4092E924C2985CE485612B526F@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> Date: Fri, 12 Oct 2012 01:41:33 +0200 X-Google-Sender-Auth: GirVSOwFqb7iBSpOsV_S9HCwG3A Message-ID: To: Clint Priest Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04451a09b72a2d04cbd11ddf Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 From: amaury@amaury.net (Amaury Bouchard) --f46d04451a09b72a2d04cbd11ddf Content-Type: text/plain; charset=ISO-8859-1 You really don't want to even think about my idea? It's complementary on some 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 property references ($o->Hours) > 2) Change syntax to use public set($value) { }, public get(), etc. (and > along with that means no more "magic" $value) > 2a) If possible, allow for Type Hinting... > 3) Eliminate automatically implemented get; set;, no automatic backing > field creation will occur. > 4) read-only / write-only keywords will be eliminated > 5) Exceptions thrown from accessors will be made more appropriate (I will > also 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 > RFC. > > > > 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 > directly, 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 > eliminated 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 > --f46d04451a09b72a2d04cbd11ddf--