Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81079 invoked from network); 3 Nov 2014 19:59:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2014 19:59:19 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:53846] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/01-10620-69ED7545 for ; Mon, 03 Nov 2014 14:59:18 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 974BBB00093; Mon, 3 Nov 2014 14:59:15 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FbZw6dkm6AEI; Mon, 3 Nov 2014 14:59:15 -0500 (EST) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 4FE94B0008E; Mon, 3 Nov 2014 14:59:14 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <5457DC1B.9040609@sugarcrm.com> Date: Mon, 3 Nov 2014 19:59:12 +0000 Cc: Stas Malyshev , Robert Stoll , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <0924CAE8-CF12-4D4A-A2E9-039C717C947D@ajf.me> References: <002601cff777$eb923430$c2b69c90$@tutteli.ch> <68518A5F-4A11-4D93-914D-760A4CB447E8@ajf.me> <5457D749.2010406@gmail.com> <5457DC1B.9040609@sugarcrm.com> To: Stas Malyshev X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] Types on the right or on the left From: ajf@ajf.me (Andrea Faulds) > On 3 Nov 2014, at 19:48, Stas Malyshev wrote: >=20 > Hi! >=20 >> This is an unfair comparison. Hack is a compatible superset of PHP, >> much like TypeScript is a compatible superset of JavaScript. >=20 > So? PHP once borrowed Perl syntax, and Java syntax, and so on. Hack > borrowed PHP syntax, and that's great. But that doesn't mean what they > do in their own language should constraint what we do in PHP. Again, an unfair comparison. Hack isn=E2=80=99t intended to be a = completely separate language. It=E2=80=99s supposed to be an augmented = PHP, which is compatible with PHP. PHP code can use Hack code (in HHVM, = anyway) and Hack code can use PHP code. Hack is a superset of PHP. There = are transitional modes, too. >=20 >> I=E2=80=99d rather there be less divergence between Hack and PHP, to = limit >> the damage that it causes to the community. >=20 > I don't see any damage to the community. How PHP not matching other > language's syntax does any damage to the community? What kind of = damage > and where this damage comes from? Are we damaged because PHP arrays = and > Perl arrays have different syntax, despite obvious Perl roots in PHP? The damage is in fragmentation. Hack threatens to fragment the PHP = community by making people jump ship to use its added features. While = the whole Hack community can use PHP libraries, only some of the PHP = community (HHVM users) can use Hack code. The consequences of this could = be severe. I=E2=80=99d rather there are less differences between PHP and Hack so = there are less reasons to switch. Though I suppose the specific syntax = of types is probably not a major issue. -- Andrea Faulds http://ajf.me/