Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22567 invoked from network); 20 Feb 2015 15:24:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 15:24:53 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:43753] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/31-14173-2C157E45 for ; Fri, 20 Feb 2015 10:24:53 -0500 Received: by mail-wi0-f179.google.com with SMTP id hi2so3676537wib.0 for ; Fri, 20 Feb 2015 07:24:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=8OEduoGyhFXm0u3s57oBVrxrUUibmFaSmLJuws19ylU=; b=HeMGD+Yc4lVAVnf7Fr46sIeFkwzOjDEi8QFruIaEd6HcuTYfNZEzR43/adRxPYPlXc hKybgzPwsUd+KSNS5xlrSnD/LBq08TeBOFwDBcJlbyLgpF1uJfdY8MCb7Rq02twZPaaL MxYGNOWVuQzMyY366IE6zktt70nouj4tTfgJDW6bPm9ri9nV+k1JoVAnKqTS9W74veZu 0q1C+AKVMFgohEaWB3few6or3KqGohbewycV+jPbLIeUpFRqhSjAdbVO+lvmlULtptyI Fzaswax+pwqMiZiWnO7N6QynVK4uHePVc4Hz7vHLBAIg35Z99t/HiFWqpDU7KUwyNVKs RUmQ== X-Gm-Message-State: ALoCoQmB7Nv6GcJL3qmv7tGfyRwAbaWMcYZq0/NLBVXI6M4EhaAR+5odtBp4ojY3ayt8BynPzSJKw2ak8jSNAWESutgGYf6hlI40LOmOHhiZfXe4ddRMIh6N62WLE9CNUd1hf+DqdUz54hH8/vhq7Ou+L4OUWZMf3Q== X-Received: by 10.180.107.71 with SMTP id ha7mr6759360wib.23.1424445886350; Fri, 20 Feb 2015 07:24:46 -0800 (PST) Received: from [10.204.239.15] ([2.54.168.194]) by mx.google.com with ESMTPSA id p1sm2813614wib.23.2015.02.20.07.24.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Feb 2015 07:24:45 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (12B466) In-Reply-To: Date: Fri, 20 Feb 2015 17:24:43 +0200 Cc: Dmitry Stogov , Pierre Joye , Larry Garfield , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: 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> To: Anthony Ferrara Subject: Re: [PHP-DEV] Reviving scalar type hints From: zeev@zend.com (Zeev Suraski) > On 20 =D7=91=D7=A4=D7=91=D7=A8=D7=B3 2015, at 16:55, Anthony Ferrara wrote: >=20 > verification and static analysis aren't enough? >=20 Anthony, While IMHO they're not enough to warrant substantial deviation from PHP's be= havior, this is a subjective question that others might answer differently. But there's also an objective issue. There's a serious question mark whethe= r the type of hint - strict, coercive of otherwise can have any sort of impl= ications on one's ability to conduct static analysis, JIT or AOT (I'm bringi= ng those up again since they're closely related in terms of what you can or c= annot infer).=20 Now, I'll contend that even though I don't think we are, perhaps we're missi= ng something. But at the very least it should be clear to the list there's s= erious doubt on whether there's any extra value there even if they do seem s= tatic analysis critical. If there is, it's likely to be very, very limited i= n scope. > That's not saying you should want to use statically typed for > everything. And nor would I support PHP moving to pure statically > typed (which is why the proposal I'm backing doesn't). We're on the same page here. But the kinds of static analysis benefits you s= eem to believe we can get from strict type hints would require that - strong= typing, variable declarations, perhaps changes to casting rules - not just a= round that narrow interface between callers and callees. Thankfully that's n= ot on the table. Thanks, Zeev=