Re: [RFC] [VOTE] Class Friendship

From: Date: Sat, 07 Jul 2018 13:30:53 +0000
Subject: Re: [RFC] [VOTE] Class Friendship
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-102635@lists.php.net to get a copy of this message
Hi Internals. To explain my vote, I'm voting no for pretty much the same reasons I listed before, http://news.php.net/php.internals/90352 The short version of which is: * 'friendship' is not a good solution for allowing restricted access to some methods. * Restricting access to some methods doesn't appear to me to be a big problem that demands to be solved at the language level with class friendship. Either solving it at a different level, or some other solution at the language level, or _just not solving it at all_, would be a better trade-off to me. If the vote doesn't approve this RFC, for people who think that allowing restricted access to some methods is a still a desired thing, there has been discussion of package level modifiers including things like visibility and type strictness. To me, a package level solution would seem to be able to avoid the downsides of 'class friendship' and give a better fitting tool to solve that problem. cheers Dan Ack

« previous php.internals (#102635) next »