Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98266 invoked from network); 22 Jun 2016 23:19:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2016 23:19:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.230 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.230 mail4-3.serversure.net Linux 2.6 Received: from [217.147.176.230] ([217.147.176.230:49703] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/00-31919-B1D1B675 for ; Wed, 22 Jun 2016 19:19:56 -0400 Received: (qmail 19149 invoked by uid 89); 22 Jun 2016 23:19:53 -0000 Received: by simscan 1.3.1 ppid: 19142, pid: 19145, t: 0.0801s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 22 Jun 2016 23:19:53 -0000 To: internals@lists.php.net References: <576A6165.8090904@lsces.co.uk> <20376416-aa04-766d-6178-189d1a088b01@gmail.com> <411d306c-b42f-4ff4-8280-99ff357c94a1@gmail.com> Message-ID: <576B1D18.2050903@lsces.co.uk> Date: Thu, 23 Jun 2016 00:19:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <411d306c-b42f-4ff4-8280-99ff357c94a1@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: lester@lsces.co.uk (Lester Caine) On 22/06/16 22:21, Rowan Collins wrote: > But we haven't ever decided what that road is, so how can we know what > the next step is? What if we realise that the way we've implemented > typed properties is completely at odds with the way we want to implement > typed locals? Why should a 'var' inside a class be any different to a 'var' in an array or a simple static 'var'. If we add a set of constraints to the basic 'var' all of those constraints should be consistent where ever it is used, but currently there is no consistent way to add a constraint to the basic 'var'. Now if there is some fundamental reason not to allow those constraints, then that block should also apply consistently. The historic var is a totally flexible container with no constraints, and all of the actions to block NULL or 'string integers' and the like should work exactly the same everywhere, not requiring different methods un-associated with defining the var. But I still can't see why NOT having to worry about typing makes learning PHP more difficult. I still have no idea why I would use 'Reflections' and have no references to it in my own code and in my book that makes no difference to making code work. Typing is only a subset of data validation, and so I would teach that and not worry about any of the current 'type' functions as they get in the way. -- 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