Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92531 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18143 invoked from network); 20 Apr 2016 09:50:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2016 09:50:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:47733] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/46-14036-8F057175 for ; Wed, 20 Apr 2016 05:50:49 -0400 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id A0DD7476A8; Wed, 20 Apr 2016 11:50:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on km31408.keymachine.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-HAM-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Received: from [192.168.2.34] (ppp-46-244-184-58.dynamic.mnet-online.de [46.244.184.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id B75D8476A6; Wed, 20 Apr 2016 11:50:42 +0200 (CEST) Message-ID: <1461145839.7556.14.camel@kuechenschabe> To: Jesse Schalken Cc: Lin Yo-An , "internals@lists.php.net" Date: Wed, 20 Apr 2016 11:50:39 +0200 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> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wIT5UEsq4Mit0f1zJmKT" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) --=-wIT5UEsq4Mit0f1zJmKT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-04-20 at 18:32 +1000, Jesse Schalken wrote: > On Thu, Apr 14, 2016 at 10:47 PM, Lin Yo-An > wrote: >=20 > > > > I think the original purpose of adding type system in Hack, is to provi= de > > just-in-time compilation, this provides more information to let compile= r 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. >=20 > 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 th= e > program, and can do so with increased certainty and predictability. For that there is some research: How many bugs does static type checking catch? [...] answer: 2%. [...] not only were development times significantly shorter on average with dynamically typed languages, so were debug times. =20 So all those nasty type errors were actually not having any negative impact on debug times, in fact the reverse was true. =20 http://blog.metaobject.com/2014/06/the-safyness-of-static-typing.ht= ml johannes --=-wIT5UEsq4Mit0f1zJmKT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJXF1DwAAoJEH3sTmn8nIPXJhcIAO4QTSflqLHmqLnmb0F3HIpn mgDUQEV79iA9PRaJedC4Q5KfBDNKsCJ+7ESSUarBmVqCGsr4COBE30zGgXBpyOz6 +5tJbh5oO2OsrOeaWgNPzI5E/Bwo5atBb91PL+KAE29nWLPBc0GP8I7KTQe9gZcR W3feSZoCyGvIjUYrbX6hQ4STokY/rPzO/DmUAguyJniOI2ABtz1akbXN94bhdOoP P3aq5vOld2XAVU/4CzGilzI+XpoUbLMvPKByQjyIMdR4iOBoHCmrAUVcj1/eR1QJ 0q/v1A5UVPW+CWFBIqfMGZjUHFz6Wv2pIoUywxu1u/MfmYBDhyyAYKMLbXzEv4k= =39JI -----END PGP SIGNATURE----- --=-wIT5UEsq4Mit0f1zJmKT--