Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92196 invoked by uid 1010); 12 May 2006 17:33:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92181 invoked from network); 12 May 2006 17:33:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2006 17:33:26 -0000 X-PHP-List-Original-Sender: hartmut@php.net X-Host-Fingerprint: 213.136.52.68 mailgate-out2.mysql.com Linux 2.5 (sometimes 2.4) (4) Received: from ([213.136.52.68:60637] helo=mailgate.mysql.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id FB/90-19568-4E6C4644 for ; Fri, 12 May 2006 13:33:25 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.4/8.13.4) with ESMTP id k4CHXIV1001789; Fri, 12 May 2006 19:33:18 +0200 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 30690-03; Fri, 12 May 2006 19:33:18 +0200 (CEST) Received: from [10.100.64.53] (10-100-64-53.mysql.internal [10.100.64.53]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id k4CHXA4X016554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 May 2006 19:33:12 +0200 Message-ID: <4464C6C9.40307@php.net> Date: Fri, 12 May 2006 19:32:57 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 To: Bastian Grupe CC: Jason Garber , internals@lists.php.net References: <785810036.20060511193536@ionzoft.com> <4464AC64.5050706@gmail.com> In-Reply-To: <4464AC64.5050706@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] private, protected, readonly, public From: hartmut@php.net (Hartmut Holzgraefe) Bastian Grupe wrote: > Uhh... how about using private and only using a "regular" > getter (the Java-style) and no setter? > > class xx > { > private $bar; > > public getBar() { return $bar; } > } i think you're missing the point, the idea is to *not* have to write that extra getter line ... less typing *and* less error prone ... and easier to read, too IMHO You didn't want to return $bar in your example, you wanted to return $this->bar so you already ran into one of the issues here ;) -- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com Are you certified? http://www.mysql.com/training/certification