Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85027 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74480 invoked from network); 16 Mar 2015 11:33:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 11:33:47 -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.178 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.178 mail-ob0-f178.google.com Received: from [209.85.214.178] ([209.85.214.178:35507] helo=mail-ob0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/F0-03331-79FB6055 for ; Mon, 16 Mar 2015 06:33:45 -0500 Received: by obfv9 with SMTP id v9so33001371obf.2 for ; Mon, 16 Mar 2015 04:33:41 -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=D9MyffLDHd7TGdCyjycgHUxbiemLBudsiOXobBUV84I=; b=Aaa1FY22CTuMSusJkrE1cEbafRNfk57ASLWt5YLe5C6d/t1owScH5+Hl4shRfWaxOQ aVVSUvE6hXS7nV+8dzSF+8OpzdiC3kloRiXF/MiyMhVR/+9rkWL9cVxbVmTQdXp5x4DO XeTK0gemBnTAxUKZ0BVzGAx/1573Nmdb33sNaAyQeTnhu9SAAd7BlYkRdQHSRMKSq3Ad uEp3vGFgxSktxHLTK02TEnzmiLgd9GK+QK3HF/zZNTsIwNesC2WpZTxyOGOXmeIvCyNg 8T5GE0raTIQPY+yVTBXqedNyU0Jo/z+Kr7ECJjbJxDXj5/3FjchOBThZVwaeNadYyFsQ IWsA== X-Received: by 10.202.226.198 with SMTP id z189mr45075445oig.64.1426505621042; Mon, 16 Mar 2015 04:33:41 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.58.2 with HTTP; Mon, 16 Mar 2015 04:33:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2015 20:33:00 +0900 X-Google-Sender-Auth: q2-VMoG7VoWP0IlS_DHWg3Rb6J4 Message-ID: To: Derick Rethans Cc: Xinchen Hui , Pierre Joye , PHP internals Content-Type: multipart/alternative; boundary=001a11409180cffdb5051166381f Subject: Re: [PHP-DEV] About declare(strict_types = 1) From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11409180cffdb5051166381f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Derick, On Mon, Mar 16, 2015 at 8:18 PM, Derick Rethans wrote: > On Mon, 16 Mar 2015, Xinchen Hui wrote: > > > On Mon, Mar 16, 2015 at 5:00 PM, Pierre Joye > wrote: > > > > > > On Mar 16, 2015 4:29 PM, "Xinchen Hui" wrote: > > >> > > >> that means, I need to add a lots of (int) while I try to call a > > >> function in a library which is not written by myself. > > >> > > >> is that right? > > > > > > You got the answer but one thing bothers me a lot right now. > > > > > > How did you vote against this rfc while missing the core point of it > (after > > > actually having a strict mode)? > > > as I said, > > " > > acutaly, I believe in most applications, they will still keep this off= .. > > > > so why we introduce such thing? > > " > > I don't like strict_types at all.. > > To be frank, I don't think "I don't like this" is a terribly good reason > to vote against (or for something). What is important is how many people > would actually benefit from a feature, without it causing issues for > others. I am certainly no fan of the "declare" *syntax*, but I do know, > from talking at conferences that many many developers would like to see > scalar type hints in some way =E2=80=94 both weak (mode 1 of the STHv5 RF= C), and > strict (mode 2). It even caters for people that don't want to use them > at all, as they can simply not use them. I also know, that without a > dual mode, it seems very unlikely for scalar type hints to make it > into PHP 7, and I don't think that is what users want. As this is our > *best* bet, I can only vote "yes". Are you sure on your bet? lib.php: The declare here does just nothing. a.php: b.php: This behavior is unacceptable. Caller (a.php, b.php) must satisfy lib.php expectation to make lib.php work as it should. Otherwise, all kinds of unexpected for lib.php and it's users may happen. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11409180cffdb5051166381f--