Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83006 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43140 invoked from network); 17 Feb 2015 19:43:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 19:43:57 -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:43255] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/21-34644-AF993E45 for ; Tue, 17 Feb 2015 14:43:54 -0500 Received: (qmail 7808 invoked by uid 89); 17 Feb 2015 19:43:51 -0000 Received: by simscan 1.3.1 ppid: 7801, pid: 7804, t: 0.0757s 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; 17 Feb 2015 19:43:51 -0000 Message-ID: <54E399F6.9080609@lsces.co.uk> Date: Tue, 17 Feb 2015 19:43:50 +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: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <022801d04ab1$4a0c47d0$de24d770$@php.net> <1913e09d7f52541901d8574d2080a63f@mail.gmail.com> <54E35855.4060906@lsces.co.uk> <025a01d04ac6$b3cd7170$1b685450$@php.net> <54E364AE.8090907@lsces.co.uk> <027401d04ae0$28b64cf0$7a22e6d0$@php.net> In-Reply-To: <027401d04ae0$28b64cf0$7a22e6d0$@php.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Reviving scalar type hints From: lester@lsces.co.uk (Lester Caine) On 17/02/15 18:33, François Laupretre wrote: > What does this mean in your case ? Just that, as long as the feature is not available, your function won't have an explicit return type. Period. And, please, don't change false to 0 ;). I simply can't see the case for limited function type hints at all! I either already have clean defined data from the database, or I need to validate the data from users before using it. While validating I need to confirm constraints of data type so adding some extra wrapper that only does half the job just seems a pointless exercise. Annotating the correct data type would be of more use and I already have that in the docblock and my IDE produces those hints while I am writing the code - which it has done for many years. To my mind it IS in the IDE that much of this stuff which people keep saying is not 'runtime' should be managed, and anything that is not needed at 'runtime' should be removable but what is being added across several areas all seem to beadding the same things - partially - using different methods - without any obvious gain. Additionally I'm now passing data as an array as that was the 'best practice' a few years back so it is rare to be passing a single value anyway. -- 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