Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42254 invoked from network); 21 Feb 2015 16:21:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2015 16:21:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.177 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.217.177 mail-lb0-f177.google.com Received: from [209.85.217.177] ([209.85.217.177:38292] helo=mail-lb0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/FA-08895-770B8E45 for ; Sat, 21 Feb 2015 11:21:11 -0500 Received: by lbiz11 with SMTP id z11so11606806lbi.5 for ; Sat, 21 Feb 2015 08:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=VyYB1GsO9GKniFsdTfa0e27Y/DxkA+668pWpBz4F8Eo=; b=IHRDMMzJRFkTY2x5eXrzpuWSzw65pVfG7iqI+szY9qL3L6Af8M8fw8EkQPp9wlR+hO S5AKt/4pcDHRLHXKM5S9Gp5MYs6l6doEJ3lb/fndMQsWTtqlIXVsz5bqiUNVCX3lxe0h V3O1hlde3t7wZ99y809sONrMd6jidO6kzyV9HMY7oaYL40EVh5cL1/+RsQ4W+5vNbVdX D/iZELNHBTWrl/wmd8hcULMyYC+BqbjUmXFWSwxzZSGtwwxLpwFY4zgefAT8D46N+MWg gCOzOBWT5T9IWTx0dmXE/pKbyZZ1edb53YMUCEAApyiGAIltET+Z9XMXM0N7yY0/y57h 26QA== MIME-Version: 1.0 X-Received: by 10.152.88.49 with SMTP id bd17mr1145003lab.43.1424535668751; Sat, 21 Feb 2015 08:21:08 -0800 (PST) Received: by 10.25.43.9 with HTTP; Sat, 21 Feb 2015 08:21:08 -0800 (PST) In-Reply-To: <059701d04d73$bf9a4280$3ecec780$@php.net> References: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <022801d04ab1$4a0c47d0$de24d770$@php.net> <1913e09d7f52541901d8574d2080a63f@mail.gmail.com> <7a5d96b34b98ec1f3ee17be7fa6a1e81@mail.gmail.com> <2CBDEB67-3DE3-437D-9AF3-0E6A92027244@zend.com> <4cc0c81c7199a452534bb8edcdb19914@mail.gmail.com> <54E589F6.9030002@garfieldtech.com> <54E66569.8000709@garfieldtech.com> <059701d04d73$bf9a4280$3ecec780$@php.net> Date: Sat, 21 Feb 2015 11:21:08 -0500 Message-ID: To: francois@php.net Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Reviving scalar type hints From: ircmaxell@gmail.com (Anthony Ferrara) Francois, > Adding this case to 'float' meaning 'int|float' and 'callable' resolving = to 'string|array|object', are you sure it's worth the pain implementing and= supporting a dual-mode mechanism, compared to the ruleset I am intending t= o propose (currently in draft): https://wiki.php.net/rfc/zpp-conversion-rul= es ? I've taken a look at that proposal, and here are my comments: 1. This RFC only talks about ZPP. I assume you're also talking about exposing the same ruleset to userland? 2. You're talking about making passing `1` to a bool parameter disallowed by default. Meaning that a **LOT** of code will break automatically when upgrading to 7. Because internal function's error behavior will change. This **will** likely create a python 2/3 situation here. You're making a MASSIVE bc break here. If you were just talking about user-land types, that would be one thing. But since you're explicitly talking about ZPP, this is a bad thing. 3. It still doesn't solve the problems the strict type proponents are looking to have solved (namely that the type is what's checked, not the value). The is_numeric_string cleanup is definitely a step in the right direction (and I think should be implemented anyway), but it still doesn't solve the problem. Overall, this proposal feels like a compromise in a bad way. It makes existing code error (bc break), doesn't give the weak proponents what they want and doesn't give the strict proponents what they want either. Just because it's the middle ground doesn't make it a good thing. Please consider these issues seriously prior to making the proposal officia= l. Anthony