Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23473 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38760 invoked by uid 1010); 16 May 2006 21:10:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38744 invoked from network); 16 May 2006 21:10:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2006 21:10:02 -0000 X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:32767] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 35/60-19568-9AF3A644 for ; Tue, 16 May 2006 17:10:02 -0400 Received: (qmail 9088 invoked from network); 16 May 2006 21:09:49 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 16 May 2006 21:09:49 -0000 Message-ID: <7.0.1.0.2.20060516140413.044c2b18@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Tue, 16 May 2006 14:09:51 -0700 To: Marcus Boerger Cc: Jason Garber ,Zeev Suraski , In-Reply-To: <4010070824.20060516225528@marcus-boerger.de> References: <785810036.20060511193536@ionzoft.com> <7.0.1.0.2.20060515210559.06acd350@zend.com> <1217741491.20060515174322@ionzoft.com> <7.0.1.0.2.20060515190856.02b53bb0@zend.com> <7.0.1.0.2.20060516133713.037f5a10@zend.com> <4010070824.20060516225528@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] private, protected, readonly, public From: andi@zend.com (Andi Gutmans) Hi Marcus, I don't see why everything is always personal for you. As I mentioned numerous times in the past, having an in-depth discussion about features, both their implementation, affect on language semantics, and relevance to PHP is very beneficial for all. All I meant was that the implementation is one step (and a very necessary step) but that having a patch doesn't always mean it should be applied right away. I just want to make sure we all think it through and discuss the different cases. You seem to be very hesitant around any discussion of such patches which I don't quite understand. It's not geared towards you but the right thing for a mature project like PHP to do. So it boils down again to the same very relevant question I asked initially. Where do you see the edge cases? Can I return a readonly property by reference, can I assign it by reference? What kind of internal functions/classes need fixing? I think thinking these things through (and I believe you can find the answers for these questions) is the process we should really have in PHP. Such major patches should also discuss the dependencies. What we tend to do is to first commit, and then fix later over a period of a year sometimes even discovering down the road that we have conceptual issues. So I'm really not asking for too much. Just asking to also work on the second part which is defining better the reach of this patch. I think this part needs at least as much effort as the patch itself. Andi At 01:55 PM 5/16/2006, Marcus Boerger wrote: >Hello Andi, > > however the past has tought of something. Nobody will test a patch. >That said there won't be any feedback until it gets into at least head >and people feel confident they should experiment with it. As it stands >now you could just take it as a decision against it and be done. > >best regards >marcus > >Tuesday, May 16, 2006, 10:39:53 PM, you wrote: > > > I suggest to wait for a response about the edge cases question I sent > > out (i.e. returning a writable reference of this readonly property). > >How is a writeable reference a public read variable in php? In php we >don't have concept like c++ offeres and even there normally const methods >return const references aka read only references. > > > I for one haven't quite understood what the semantics will be in all > > the edge case situations. > >The semantics for the majority seems to be public read. E.g. the language >offers a way to circumvent or redefine visibility when reading. > > > Although I think the concept is interesting > > (and somewhat beneficial), I don't want to regret having done it 6 > > months down the line when people complain it's broken because in edge > > cases it doesn't work. We need to be sure that the semantics are 100% > > ok in all cases. Writing a patch is the easy part. > >If that was the case, then why was i the only one to provide a patch like >in so many times before. I mean yes it is easy for me, and definitively also >for dmitry and sara as well as most likely for you too. But how mayn other >people can provide such a patch? > > > The fact that > > patches can be written doesn't mean we shouldn't be careful about > > making these changes. We have made too many mistakes in the past > > which were hard to undo. > >Yes we have only i don't know what we can really do about. I mean other >then discussiong it, see that it is doable and getting a feeling for it? >We can apply it or forget it. > >best regards >marcus > >p.s.: I still have the patches for public/protected/private and those for >final and tons of others related to our object model. Want me to use them >to drop any feature? :-))