Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91660 invoked from network); 22 Sep 2017 00:34:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2017 00:34:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=mdwheele@ncsu.edu; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mdwheele@ncsu.edu; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ncsu.edu from 209.85.223.180 cause and error) X-PHP-List-Original-Sender: mdwheele@ncsu.edu X-Host-Fingerprint: 209.85.223.180 mail-io0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:43045] helo=mail-io0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/78-62331-F8A54C95 for ; Thu, 21 Sep 2017 20:34:24 -0400 Received: by mail-io0-f180.google.com with SMTP id k101so14738866iod.0 for ; Thu, 21 Sep 2017 17:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=XLJo+yMH7PzhW5lNteNCatgfhG4chJEfSRWGjwI8r7U=; b=WqApdQyhfAmF8/NHTQvaXcpQjVYyv3vXynUXuZL7HRPV1Qv42WKpVsIEynsBYloqnr u36Nw20d10fL2QeS5ddvq22hyHMuvd/jCEanHQD95thmgBFSia9DDsT2qxbhfDQ9kIvR VaRLga02CRjz6e8IntrSg6+rLLTtvSBXXXH6glxLGFbFPtFpB2hanDlNX2XtC4FhiOFq CrmEVyq0kGPihrm/erWApD2TltWMgC1MdUbLTeCy64LI3oR1PafAaiX76mPAxbk7aKgF lt7ASpjibx5D5Y4PMPaEFCDTQrotNFOaesDUdIUMQeIQG8L8UOh8iVlD0HlrVI2jLeTv oRCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XLJo+yMH7PzhW5lNteNCatgfhG4chJEfSRWGjwI8r7U=; b=BFAVmFowj+kNt48WLRtsgOnvFFQ+r+GuA5B9C+Lk2s7g8f6KNUZCUvntcVdh9c1TBe fPs4LE0xMUK7t/CLxjuZlSr5cWW6ijBjwWuB+jMUksosLjhoON5pFdDxxYZg6vTwFfBv +MGLFEn4LdGqP0pqsVP2mvZQlKs8cH0OLU0UmqLVlb3EVo3dngtHAGDlAEKLiFYqrGJK xehmIqKCAUI++mmw28tJY+Vtmf0YAGgfvRk5hJ+WTbeFnS7NmlK45IzR/vcYQbn+XLr7 cR9HjVpJ2XpZXr6LV3EZqYP0bLuMFHd2D4Y223vsyfxhNe6BkK6gMnfCZ83TTwTdfX5m sc2A== X-Gm-Message-State: AHPjjUj+MoeIWvop0Hi9yX2YQQEwb1v7+9E/sc4063y1g08qlSYrQP25 B5fbUvPGPHLfZeCHHuDm9Kwm1WGu2kf9TFlnEYeunK9rmZk= X-Google-Smtp-Source: AOwi7QATacHIf0oFW7kVXZW1aYTLGRteYVg8KLMF2ZZk5bkHISnIEcq8dGd2Hswnl3CbpDl1iCZ0zUXW5AW2xBuwOQA= X-Received: by 10.202.185.9 with SMTP id j9mr4177563oif.45.1506040460775; Thu, 21 Sep 2017 17:34:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.63.2 with HTTP; Thu, 21 Sep 2017 17:34:20 -0700 (PDT) Date: Thu, 21 Sep 2017 20:34:20 -0400 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="001a113cd3baaec98d0559bc5e5e" Subject: [RFC] [Discussion] Class Friendship in PHP From: mdwheele@ncsu.edu (Dustin Wheeler) --001a113cd3baaec98d0559bc5e5e Content-Type: text/plain; charset="UTF-8" Hi! Almost two years ago, I opened discussion regarding my proposal to support class friendship through a new keyword, `friend`. For a number of reasons (mostly work-related; some personal) I didn't have time to move the process forward. There were several hot-topic discussions going through the mailing list at the time that I believed deserved more attention. I feel that my RFC was ill-timed, perhaps. That said, we're almost two years into the future! I would like to re-open discussion of my RFC and get it to vote appropriately soon. In the previous discussion, there was on-going work to introduce package-private classes by Guilherme. As far as I can tell that work is stalled, pending fundamental changes to how namespaces are implemented in PHP (https://github.com/php/php-src/pull/947#issuecomment-224912697). Like many others, I am very excited for the possibility of package-private classes or namespace visibility features of any kind. Even so, my personal vision of that landscape includes class friendship as a unique, explicit and concise expression of tight-coupling between object-oriented collaborators. I do not feel these efforts are either-or. I believe they both contribute to a more expressive means of specifying the relationship between collaborators with regard to visibility. The RFC is at: https://wiki.php.net/rfc/friend-classes I need to rebase my implementation against `master` and send a PR. I will have that done before voting begins as it includes several test cases and I would appreciate additional perspectives to catch edge-cases I may not have thought of. The implementation was quite straight-forward. Thanks! -- Dustin Wheeler | Software Developer NC State University mdwheele@ncsu.edu "If you don't know where you're going, it's easy to iteratively not get there." --001a113cd3baaec98d0559bc5e5e--