Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63432 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84545 invoked from network); 16 Oct 2012 07:54:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 07:54:30 -0000 Authentication-Results: pb1.pair.com header.from=tbprogrammer@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tbprogrammer@gmail.com; spf=pass; 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: tbprogrammer@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:38383] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/31-10021-5B21D705 for ; Tue, 16 Oct 2012 03:54:29 -0400 Received: by mail-ob0-f170.google.com with SMTP id ni5so6401513obc.29 for ; Tue, 16 Oct 2012 00:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pNwR+9JVhLmNjFLyNEx0M+hJow2qCYjwoBJTUFBk4Ts=; b=pp/wJ2AseXY2t2UTEPKd53wyvG88Q5fiN+X51I2pXgAcnkHTLFaQkHqkKVOSIc8VDO gzgrHOSTpGAyNA83yQI8roqewK8KngAGA5w20hrGDPSf8ZHlSr2zrxiVIN5Hd0OpnBCc uX8pfZ5V+zidzg3CCwAKdX/6FXS2H0Nj2/XxvHtgeLEN+hp97ilTTM2qMrTztzSMy5+a zP8KNXkBM1XL8yVSnt4X+8QonZgmCQIMKGG/sziZhVnNjG5xAm2Sp1PsMVJsF0lu4BtJ /hS5EMxlsv5pC9r6fLbxGIiywc8vyFbsLjE5aLd62qqnMzFiOOip91raW2LONsxNTt/T 2Kbw== Received: by 10.60.11.67 with SMTP id o3mr12105782oeb.43.1350374066573; Tue, 16 Oct 2012 00:54:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.170 with HTTP; Tue, 16 Oct 2012 00:54:06 -0700 (PDT) In-Reply-To: References: <9570D903A3BECE4092E924C2985CE485612B6466@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B655A@MBX202.domain.local> Date: Tue, 16 Oct 2012 00:54:06 -0700 Message-ID: To: Amaury Bouchard Cc: Clint Priest , Etienne Kneuss , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8fb2066e8d536c04cc2876b0 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces From: tbprogrammer@gmail.com (Jazzer Dane) --e89a8fb2066e8d536c04cc2876b0 Content-Type: text/plain; charset=ISO-8859-1 I prefer the current syntax to your proposal because: 1) It is not at all obvious which side is which. Example: *protected:private * Is protected* *for get? Or set? The average PHP developer will have no idea. In fact, they likely won't know that they even correlate to get and set. 2) There is no such syntax already in PHP. (And on a more personal note, I don't think I've ever seen that syntax in any other language that I've worked in before. Which means it's even *more-so* out of people's comfort zones.) The current read/write syntax works, and none of the discussion I've read thus far would sway me towards any other option. That being said, I wouldn't contest to hearing - in more detail - your reasoning behind why we should use it instead of the current syntax. On Tue, Oct 16, 2012 at 12:39 AM, Amaury Bouchard wrote: > 2012/10/15 Clint Priest > > > Also, your "should be valid" statement implies that you feel properties > > and accessors are the same and they are not, internally. When a class > > attempts to implement an interface a "function check" is done and since > > there is no __getXX() function defined it would fail to implementation > > check against an interface. > > > > I cannot stress enough that properties != accessors in any way except the > > syntax in which they are used ($o->xyz) or ($o->xyz = 1), that is their > > *only* similarity. > > > I disagree. That's why I said this is a matter of choice. A philosophical > choice. > I don't see properties and accessors like different things which are > accidentally written the same. Accessors are a layer upon properties. It's > a magical layer, trying to mimic accessors. > It's a bit like aspect-oriented programming: you can add layer but the core > is still the same (from a developper point of view, not from the PHP > interpreter point of view). > > > See another argument: My proposal for read/write accessibility definition. > When I suggested to allow this syntax: "public:private $abc;" > some people objected that it's the same than "public $abc { get; private > set; }" > > So, if I understand what you said, for you it's deeply different and > comparing them is like comparing apples and oranges. I disagree. I still > think my syntax is better (and could be implemented with better > performance), but it's normal to compare them, because they (can) offer > pretty much the same functionnalities. > --e89a8fb2066e8d536c04cc2876b0--