Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82678 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95699 invoked from network); 14 Feb 2015 09:59:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2015 09:59:07 -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:57140] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/B0-25612-66C1FD45 for ; Sat, 14 Feb 2015 04:59:06 -0500 Received: (qmail 18137 invoked by uid 89); 14 Feb 2015 09:58:47 -0000 Received: by simscan 1.3.1 ppid: 18119, pid: 18131, t: 0.0832s 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; 14 Feb 2015 09:58:47 -0000 Message-ID: <54DF1C4E.50400@lsces.co.uk> Date: Sat, 14 Feb 2015 09:58:38 +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: <00f301d047ef$609f8fd0$21deaf70$@yahoo.fr> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: lester@lsces.co.uk (Lester Caine) On 14/02/15 01:16, Andrea Faulds wrote: >> - About the 'numeric' type you would introduce in a future RFC, would you (in strict mode) allow everything accepted by is_numeric() or is it just a shortcut for 'int|float’ ? > The idea is just int or float (except in weak mode of course, where it needs to accept strings etc.). But that makes the naming possibly misleading. I’d prefer “number”, but that’d be a BC issue I expect. But that’s for a different RFC. Just how often have we had 'But that’s for a different RFC' in the past where things have not been fully thought out for a major feature. There are a number of areas that either required reworking or changes later because the whole problem had not been thought out. The whole idea of 'hinting/checking' is so important and I would take things a lot more seriously if there was a way of hinting at what a function required rather than some nebulous wrapper which may even change itself. strict typing is used by compiled languages to ensure that the right SIZE of parameter is passed. Simply saying 'int' and then even allowing some unconstrained object to be passed is not my idea of data management! The fact that this issue as had the biggest vote I have ever seen shows how passionate people are about it and not having a vote on the matter does irritate me, but I do have a get out clause, I don't have to use PHP7 which is a shame because what I have working so far IS good. This is going to be like PDO, half baked and missing the point. Just like PDO we need a decent library that manages type constraint properly and that will be even more important if the vote on bigint goes through and destroys what remaining size management we do have! The vast majority of parameters DO have a limit on their size. -- 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