Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81574 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2750 invoked from network); 2 Feb 2015 09:19:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2015 09:19:39 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:56995] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/37-02376-9214FC45 for ; Mon, 02 Feb 2015 04:19:39 -0500 Received: (qmail 15884 invoked by uid 89); 2 Feb 2015 09:19:34 -0000 Received: by simscan 1.3.1 ppid: 15875, pid: 15881, t: 0.0661s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 2 Feb 2015 09:19:34 -0000 Message-ID: <54CF4126.8030901@lsces.co.uk> Date: Mon, 02 Feb 2015 09:19:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54CBC804.7050706@gmail.com> <54CD7668.30301@garfieldtech.com> <61B0AAF8-9A3E-4889-917E-42AA48D946FA@ajf.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Immutable variables and objects From: lester@lsces.co.uk (Lester Caine) On 02/02/15 07:31, Alexander Lisachenko wrote: > Agree in that point with you, this can be a good instrument if implemented > in PHP. I see a good point in it by using this with interfaces and "const" > modifier for parameters: > > class Foo { > public function bar(const Baz $object); // Require an instance to be > passed as copy > } OK as usual I am missing something again ... This is probably because I still don't understand objects, as I still just consider them as arrays with a few more complex elements. I STILL work on the basis that is I pass by reference, I can make modifications to the data while if I don't I get a copy and have to pass the copy back if I need the original changed. This used to be all very simple, so when did it stop working? This may explain why I get into trouble with stuff that has been working for years but after 'modernising' starts throwing problems :( -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk