Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63438 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12437 invoked from network); 16 Oct 2012 09:32:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 09:32:55 -0000 Authentication-Results: pb1.pair.com header.from=amaury.bouchard@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=amaury.bouchard@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.42 as permitted sender) X-PHP-List-Original-Sender: amaury.bouchard@gmail.com X-Host-Fingerprint: 209.85.219.42 mail-oa0-f42.google.com Received: from [209.85.219.42] ([209.85.219.42:56211] helo=mail-oa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/E6-10021-6C92D705 for ; Tue, 16 Oct 2012 05:32:55 -0400 Received: by mail-oa0-f42.google.com with SMTP id j1so6535458oag.29 for ; Tue, 16 Oct 2012 02:32:52 -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=O78fjaL8QAylDWLZ69BODc8orhhSWuWUZWc/RFaFQgc=; b=hguMXaLA3seMmL/XGivpXaoOTPN7ZlMpgCsWTbwaJ3qRg0iv/GRdysRhAWR0Gfc5vb sqJvXh5ob/WwZ9juSERcRGwC6tlWa+NvyfbaC5X/pCJlhRNuddtI6+smH6pC878G+wBq V3pETZOpG/lOzhjH5Ags6n3tj5t3UtPWhSHWpHoR5oyqX5I8+ASb9TGv0331GvrOkeu5 1H+R2f7j7sEe1aGkJ8q3G6F+3HiVMurBC7UgUiNvWAB+NdxZBSSyfzNPD6yt5uSln3L2 iQLH0U/IgDNPWGBjyHKA2MoOCBPwDxVazPqtsmE9ijZCAsYbSqH16AG+nchQwQZT6mfl 6wnA== Received: by 10.182.156.99 with SMTP id wd3mr3241975obb.15.1350379972034; Tue, 16 Oct 2012 02:32:52 -0700 (PDT) MIME-Version: 1.0 Sender: amaury.bouchard@gmail.com Received: by 10.182.24.169 with HTTP; Tue, 16 Oct 2012 02:32:31 -0700 (PDT) In-Reply-To: References: <9570D903A3BECE4092E924C2985CE485612B6466@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B655A@MBX202.domain.local> Date: Tue, 16 Oct 2012 11:32:31 +0200 X-Google-Sender-Auth: _hcNC31fyCpBlIypdKT6zw42bQI Message-ID: To: Jazzer Dane Cc: Clint Priest , Etienne Kneuss , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d0444e8698b814504cc29d6b7 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces From: amaury@amaury.net (Amaury Bouchard) --f46d0444e8698b814504cc29d6b7 Content-Type: text/plain; charset=ISO-8859-1 This discussion is opened in the dedicated thread. I used my proposal as an example to illustrate my point of view, not to pollute this thread. 2012/10/16 Jazzer Dane > 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. >> > > --f46d0444e8698b814504cc29d6b7--