Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78727 invoked from network); 16 Mar 2015 05:45:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 05:45:14 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:35110] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/33-06614-9ED66055 for ; Mon, 16 Mar 2015 00:45:13 -0500 Received: by obfv9 with SMTP id v9so28053845obf.2 for ; Sun, 15 Mar 2015 22:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=XlOerNAMlixLn89FPShoJ1PuM9vG6bQbejS77azQYKY=; b=08XEVLPuoPKGEzM+iRnCRSkLoragdP+bumdzAkCXo1YBXXK3nLf+bsdwkDc2khPdkw HTxDS9An9C5oNPt1Mn8hXtKNYIKSyxgDjlqQaKRXCNpHpo9sUlriLEuOXbfEQUXuMrn1 s52EM2NFMxKQLI4OW20HbkoVkuxT1ixBKfaZMEAZs6AgofsHtmMTSqNFZLTgZnY45jX2 HS91kvf1/bMJeHulA8Qmbcc830ttfdeenRbJurQFGSRca/T2B74dxCl3s0RO9ldD6bfq 6cInLVa9tHBFLOfUDiqaSLpT53gvnNIUKTXv2ybeh63OhRspp2WvecDquSBn8LK2A4vB p7jQ== X-Received: by 10.202.57.195 with SMTP id g186mr44210653oia.86.1426484710739; Sun, 15 Mar 2015 22:45:10 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.58.2 with HTTP; Sun, 15 Mar 2015 22:44:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2015 14:44:30 +0900 X-Google-Sender-Auth: fhNiTln1ClodE_BH_N-sw6DAONo Message-ID: To: Pierre Joye Cc: PHP internals , Anthony Ferrara Content-Type: multipart/alternative; boundary=001a113cfe5c76137a0511615aa1 Subject: Re: [PHP-DEV] [RFC][Status] Scalar Type Declarations Voting Date Change From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113cfe5c76137a0511615aa1 Content-Type: text/plain; charset=UTF-8 Hi Pierre, On Mon, Mar 16, 2015 at 12:31 PM, Pierre Joye wrote: > > I'm not saying the proposed patch has bugs, but I'm saying it hides > "users' code bugs". > > > > Hiding hard to find bugs does not make much sense while there is the > proposal that finds it. > > What I'm trying to say is "Why don't we collaborate?". Let users fix > bugs at first, then > > introduce more strict type checks if it's needed. Coercive type and > strict type can co-exist > > together well, but weak type and strict type cannot. > > This example is out of the scope of this rfc. As I said many times, you > want to make php more friendly and let users write better code, that's a > good thing. However changing by default how php behaves for decades is a no > go for me. It will create more issues than it solves. > Whether we like or not, languages that support type safety are getting popularity even for web app development in these days. What Zeev is proposing is common conversion rules that many languages support already. If we are going to support type safety in some forms, we should try to adopt well established rules if it is available. I'm not objecting ZVAL type check only strict typing, but I'm suggesting Zeev's proposal is more suitable for weakly typed PHP. It works well with strict type also. Introducing type safety is the objective of scalar type hints. In other words, let users enjoy less bug programs by systematic support. IMO. What we should think is "do it right or not". Hiding type related bugs by enforcing C language like type is not good at all. IMHO. I'm 100% sure that users will have bad codes with this RFC from my code auditing experience. In contrast, Zeev's proposal will prevent "bad codes" nicely and effectively. That's the reason why I prefer the proposal. PHP is made to be a nice an easy web app language. It's clear to me which one is preferred choice for introducing type hints for "now". I understand concern about old code compatibility. If currently proposed migration term is not enough, we may extend it by other RFC. There is enough time until we introduce destructive change. We may change migration period at any time with users feedback. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113cfe5c76137a0511615aa1--