Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47096 invoked from network); 13 Oct 2012 08:06:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2012 08:06:33 -0000 Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; 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:54806] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/C8-06472-70129705 for ; Sat, 13 Oct 2012 04:06:33 -0400 Received: by mail-lb0-f170.google.com with SMTP id gm13so2556980lbb.29 for ; Sat, 13 Oct 2012 01:06:29 -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=13DzqjwICAfuiPufGcOmLqLb87Y3hEVa3kaPNsLX3kQ=; b=gp30FED7SaO4RFMM9qaAiJp8BKYvp+4hl6/EGxU3l+Q+EceBQrk38HVmpJy/0pGv5b ydAiIl9ouvouSmHqWgUzYHhiw4+Hk56HjaqRh+DdBfTz+ODO46EMePPulNkj2vrp29ir AEY/7L0eEQezU/JTP4IZKte9HXTo0s4E49ng1+gx9GnEliVIO8W5a3+LFOgCZrKycM+n eam2ZLKL3RowC8iq4v9B7AmgVHePO0hXfQjbAGO/3xnBgP5vnBKXIK08a3VGFmLI8a9t khc2bRTynPAOjQG+QoFiqa+gMOo9navAWQAIciyiIBN07VasdkAnk3RMoceCPNsBmfPe LWmw== MIME-Version: 1.0 Received: by 10.152.122.11 with SMTP id lo11mr5778748lab.3.1350115589129; Sat, 13 Oct 2012 01:06:29 -0700 (PDT) Received: by 10.112.132.102 with HTTP; Sat, 13 Oct 2012 01:06:29 -0700 (PDT) X-Originating-IP: [93.129.128.5] In-Reply-To: <9570D903A3BECE4092E924C2985CE485612B53E4@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485612B53E4@MBX202.domain.local> Date: Sat, 13 Oct 2012 10:06:29 +0200 Message-ID: To: Clint Priest Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d042f94bc18858204cbec488f X-Gm-Message-State: ALoCoQldN/Q3eashwoeGoW11wBWOrpFw7yZIL4IiIoNf1p7Wb4Fpb6SPIpIGJ9tcjV/JW/P+M5Rv Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 From: kontakt@beberlei.de (Benjamin Eberlei) --f46d042f94bc18858204cbec488f Content-Type: text/plain; charset=ISO-8859-1 On Fri, Oct 12, 2012 at 7:23 AM, Clint Priest wrote: > Alright, here is the updated RFC as per discussions for the last few days: > > https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented > > If you could read it over, make sure I have all of your concerns correctly > addressed and we can leave this open for the two week waiting period while > I make the final code changes. > > -Clint > > Can we discuss the removal of automatic get; set; again? For me that was the best feature of the whole RFC, essentially allowing to define a property with getter/setter in 1 LOC. Allowing future overriding of that getter/Setter if the application required it. This is absolutely essential for database backed recods which will have tons of those property accessors. Now if i apply PSR coding styles to accessors, then i end up with 11 LOC for accessors defining a property, a property accessor and get/set functions, compared to 10 LOC with usual getter/setters. As i understand it was removed because of the unclear behavior when we have the following code: public $Foo { get(); set($value) { $this->??? = $value; }} I propose to reintroduce this shortcut, if you define both getter/setter as automatic: public $Foo { get(); set(); } The syntax is up for grabs, but it would be very sad if this be removed. greetings, Benjamin --f46d042f94bc18858204cbec488f--