Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35638 invoked by uid 1010); 17 May 2006 11:21:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35623 invoked from network); 17 May 2006 11:21:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2006 11:21:54 -0000 X-Host-Fingerprint: 193.190.138.70 madoka.isw.student.khleuven.be Date: Wed, 17 May 2006 07:21:52 -0400 Received: from ([193.190.138.70:10547] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 51/63-19568-0570B644 for ; Wed, 17 May 2006 07:21:52 -0400 Message-ID: <51.63.19568.0570B644@pb1.pair.com> To: internals@lists.php.net References: <785810036.20060511193536@ionzoft.com> <44647B7A.2070301@php.net> <932738738.20060513112734@marcus-boerger.de> <837405862.20060513223403@ionzoft.com> <36828701.20060514110529@marcus-boerger.de> <31269879.20060514221212@marcus-boerger.de> User-Agent: slrn/0.9.8.1 (Debian) X-Posted-By: 193.190.138.70 Subject: Re: [PHP-DEV] private, protected, readonly, public From: timvw@users.sourceforge.net (Tim Van Wassenhove) On 2006-05-17, Stanislav Malyshev wrote: > JG>> private readable $abc; > JG>> - doesn't make sense. > JG>> > JG>> protected readable $abc; > JG>> - sub-class can read, not write > JG>> - not visible outside class > JG>> > JG>> public readable $abc; > JG>> - sub-class can read, and write > JG>> - outside class can read, not write > > For me such setup seems quite weird - why adding "readable" keyword to > "public $x" ort "protected $x" makes it read-only? It's not exactly what > word "readable" means - it means you can read, not you can not write. > I'd say adding "readable" means everybody could read it, while writing still > restricted by access modifier, so readable private means only owner can > write, readable protected means owner and descendants can write and > readable public is just public. This would make more sense - if we decide > readable should be a modifier, of course. To me it seems this is going to lead to: (unwanted) readonly public, readonly protected, readonly private writeonly public, writeonly protected, writeonly private readwrite (or regular) public, protected and private -- Met vriendelijke groeten, Tim Van Wassenhove