Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63344 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27359 invoked from network); 11 Oct 2012 08:03:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2012 08:03:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 209.85.217.170 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:51420] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/D3-04101-F5D76705 for ; Thu, 11 Oct 2012 04:03:45 -0400 Received: by mail-lb0-f170.google.com with SMTP id gm13so1081576lbb.29 for ; Thu, 11 Oct 2012 01:03:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=zn908SxbZVamA5wDYyRyNsEFNjWqL8akYuXheIYz2As=; b=O0eQC3SkGt89/iMvY+MOELUumck8h/gC6+/lulZj+p2jCoC6PxUlEwYIeAENMW3Z1S vojDTFnfkMB4A3jb+kQ13yxWYvVlXE6LJulXXxb4421ryCHc47JbEuESo9+Sgl+ptWa6 esG3t06xV0TJ8wOrfDctoillr5ofQKas8vHP5d3PkGVdPWWPXbmPJnOTT/Sk6O2qOyCB 0EwMVlPhWaktUyjSY7lfo4CijMqh4xFBJajoFqZX80J86zW3gh3taGb4ukjllVCnzbyt d8YNTWPTzNRf/DrEs1DHKmyMGxqJgi0w5R48ONzsB5O49S9MnGBZf7lGwdxQWL0bgS6t e15w== MIME-Version: 1.0 Received: by 10.152.104.44 with SMTP id gb12mr47772lab.29.1349942620557; Thu, 11 Oct 2012 01:03:40 -0700 (PDT) Received: by 10.112.132.102 with HTTP; Thu, 11 Oct 2012 01:03:40 -0700 (PDT) X-Originating-IP: [178.200.247.30] In-Reply-To: <9570D903A3BECE4092E924C2985CE485612B4EFE@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> Date: Thu, 11 Oct 2012 10:03:40 +0200 Message-ID: To: Clint Priest Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04088ef55d906804cbc402a6 X-Gm-Message-State: ALoCoQlmwkny6G95pvNQwPmagVw6zESeC0qZ0MjEBOu4dXwFXwQJArADFLTY5JhWUnn4A7LF4oK1 Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 From: kontakt@beberlei.de (Benjamin Eberlei) --f46d04088ef55d906804cbc402a6 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 11, 2012 at 2:35 AM, Clint Priest wrote: > 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. > This is actually the most useful for me imho, why is it confusing? It creates a property that is a pure getter/setter what 90% of the properties need. It would be a shame to see this go. > 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. > +1 for private final. Its already there, why not use it. > 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? > The Reflection API has to be such, that I can code-generate a stub of the class just from the Reflection API.That means that we have to have access to the getter/setter methods of the property, otherwise we couldnt generate a stub for "public $Hours { public set(DateTime $time) { ... }}" > > 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 > --f46d04088ef55d906804cbc402a6--