Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98877 invoked from network); 1 Mar 2016 09:33:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2016 09:33:10 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:2657] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/E1-07778-3D165D65 for ; Tue, 01 Mar 2016 04:33:08 -0500 Message-ID: To: internals@lists.php.net References: <1F.91.55238.41F10D65@pb1.pair.com> <56D42CD3.6020602@gmail.com> In-Reply-To: <56D42CD3.6020602@gmail.com> Date: Tue, 1 Mar 2016 09:32:55 -0000 Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 80.177.120.119 Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal From: TonyMarston@hotmail.com ("Tony Marston") "Rowan Collins" wrote in message news:56D42CD3.6020602@gmail.com... > >Tony Marston wrote on 29/02/2016 09:55: >> "James Titcumb" wrote in message >> news:CAKnqCEY7art1GUWG=Pm0wyPGQmYp0Dq8oxdohgBkSGq+O_BTZw@mail.gmail.com... >> >>> >>> On 28 Feb 2016 06:18, "Jakub KubĂ­cek" wrote: >>>> >>>> I see a difference in its >>>> _semantics_. While the `public` modifier states anyone can change the >>>> property, `var` is useful for marking internal properties which must >>>> be public, but should not be manipulated by simply anybody >>> >>> If it's public, it will be modified by someone. >> >> Incorrect. It *may* be modified, but surely any invalid modifications >> will be detected in the testing phase? > >Detected by whom? Using what tool? If changing a variable directly instead of using a setter does not produce an error that can be detected in your testing, whether that testing is automated or manual, then is there actually an error? If doing something does not cause a problem there there is no problem that needs fixing. Preventing something from happening which does not cause an error even if it did happen seems like wasted effort to me. -- Tony Marston