Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92526 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8103 invoked from network); 20 Apr 2016 08:32:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2016 08:32:22 -0000 Authentication-Results: pb1.pair.com header.from=jesseschalken@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jesseschalken@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: jesseschalken@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:36337] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/64-14036-29E37175 for ; Wed, 20 Apr 2016 04:32:20 -0400 Received: by mail-ig0-f170.google.com with SMTP id f1so122186674igr.1 for ; Wed, 20 Apr 2016 01:32:18 -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:date:message-id:subject :from:to:cc; bh=dc6ID7rlRLnpMQUKalKZjI6mBBBfIMiHg9StA4mr8yo=; b=Jt1whwjwHaDKJlgUFsum5RD8+1hEbrH7ySdKIycYGuKUA6piBifrZKCEet/sb0nlng QYbG4Rjf3vSRmyycFOgkCBiI7JazNeIIX5dxTFWRsKpdrGfX9AinY7lTz0PEMpYPND0L avCsKX0aXkgmrhpXe72ABUI8POCLmhY+oFWgAaUvjI1A1sL7JWdaVCNPlkMclBEKbbpC 2WZkC2oDllOzVw4pXiwMM3Qf5X+8XexHDNRatM/g41JUtKWtCmvJdYEKQHssU6nTG086 //7TBtBx/yjECQwW0zgm7u5rK9MyPTP8ilM83+LlvXmaqm1WQCiJThnIbCm1T4Hf4ZuD NlVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=dc6ID7rlRLnpMQUKalKZjI6mBBBfIMiHg9StA4mr8yo=; b=BPU9xbyjXs7hsB9XSsJ5uyYPoos8yCwHIdi8y8FSMan0O/ssU1k5MLwqM11+Idh83b LwX+cX69JrhP4LTeTAIPXa8PVDvYki9qLPk0aaDn4LHckqS+FPL2FeaZ7wrrCots91z+ G28VtQAC9Z1v9S7Ct+pG9MDAA/zQStutvE50XBmXcWYVCpF8Ku9TQME4dE2/HaKx9MMq h+ANJJWivtnWcenVPw1JxW0H8myEE9cjeAxYwdRck0+0x7GeZ2ZA37QTpwXrxGCUxFTR B7KqG8LV80ImQajLq8QtLRiDH8YKJJQsWBsDsWYxAE3gU7HSxZlndWM3qppqHJ1sDT2K oTyQ== X-Gm-Message-State: AOPr4FXthhSKexbMJ146/493XnYuzNqqnYlJpSntRPsW3h9qAIQzYW77MYfgYs2pAYfaewiwQf+/KY8MoodKFA== MIME-Version: 1.0 X-Received: by 10.50.72.107 with SMTP id c11mr2121672igv.85.1461141136079; Wed, 20 Apr 2016 01:32:16 -0700 (PDT) Sender: jesseschalken@gmail.com Received: by 10.79.139.133 with HTTP; Wed, 20 Apr 2016 01:32:15 -0700 (PDT) In-Reply-To: References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> Date: Wed, 20 Apr 2016 18:32:15 +1000 X-Google-Sender-Auth: luyA-XDk9M2xRzT_qDLMnkGHQV4 Message-ID: To: Lin Yo-An Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bdc15ba6205e30530e66e8e Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: me@jesseschalken.com (Jesse Schalken) --047d7bdc15ba6205e30530e66e8e Content-Type: text/plain; charset=UTF-8 On Thu, Apr 14, 2016 at 10:47 PM, Lin Yo-An wrote: > > I think the original purpose of adding type system in Hack, is to provide > just-in-time compilation, this provides more information to let compiler to > optimize the code with specific type. > > Last I checked, the HHVM JIT treats PHP and Hack code roughly identically and doesn't use the Hack type annotations for any optimisation. It's is really just another dynamic language JIT, like V8 and Chakra. The purpose of type annotations and type checkers for dynamic languages, including Hack, TypeScript and Flow, is not necessarily to improve performance but to improve developer efficiency. Wherever there exists a type annotation which is enforced, either statically or at runtime, the developer has gained important knowledge to inform the modification of the program, and can do so with increased certainty and predictability. --047d7bdc15ba6205e30530e66e8e--