Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95283 invoked from network); 20 Feb 2015 18:58:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 18:58:45 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.172 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.172 mail-pd0-f172.google.com Received: from [209.85.192.172] ([209.85.192.172:37779] helo=mail-pd0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/7D-14173-3E387E45 for ; Fri, 20 Feb 2015 13:58:45 -0500 Received: by pdbfl12 with SMTP id fl12so9524313pdb.4 for ; Fri, 20 Feb 2015 10:58:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=2qJV4liz8/UNzKs5Z5UIoPp2FtTnzmnTSlEO1lQxbNQ=; b=QtIArXFvp95aa1cQpvnorGm+CzYsERi401NcrDTpwsYWR5kEenhzYXA97O117pKpxu v7iN7OvDK1rUYmezBKsNTU9aZ9NtUv9HONmxoDqhAGLxP4LmC4tuKILSYz7cvw7bUU55 lL4z0gGGv0vFgnF0JdgooEe6aL2s1L45iNaQ11mSzAnsXUPUIkxUrpjOYn1tOhFlzegc lq4/37LMbpbCEn4wGUdXgYvfDLbPJ9mjMfZMb4SPWTndAt7fiFYQsGrOySAS4Kr9Q/7I TmqM7w3RRrHm2yiFW0RM8iOuSWiWxdBpjNhEQ6g99PJ1FlVMvlOijMMImvvjCQIjUgPw nW6Q== X-Gm-Message-State: ALoCoQn0HtaIhiUW6vUc9p6ICrmQHLNMzjAkJ2l5r3J1ClFH+RL5cigAUWvcyI6Xposqi1x0v8tz X-Received: by 10.69.31.203 with SMTP id ko11mr19326298pbd.70.1424458720435; Fri, 20 Feb 2015 10:58:40 -0800 (PST) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id x4sm2828266pas.40.2015.02.20.10.58.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 10:58:39 -0800 (PST) Message-ID: <54E783DE.9050206@lerdorf.com> Date: Fri, 20 Feb 2015 10:58:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Josh Watzman CC: Anthony Ferrara , Larry Garfield , "internals@lists.php.net" References: <20150220170854.308596800F2@frontend2.nyi.internal> <54E77D2E.60407@lerdorf.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TU2fVk9QXSRNM6qt87vh7CivKALeLMjdi" Subject: Re: [PHP-DEV] Reviving scalar type hints From: rasmus@lerdorf.com (Rasmus Lerdorf) --TU2fVk9QXSRNM6qt87vh7CivKALeLMjdi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/20/2015 10:52 AM, Josh Watzman wrote: > On Feb 20, 2015, at 10:30 AM, Rasmus Lerdorf wrote= : >> Hack examples all using > >> echo number_format('1000'); >> echo htmlspecialchars(1000); >> echo md5(1000); >> >> These are all fine both as far as the type-checker is concerned as wel= l >> as the runtime, of course, but they are runtime fatals in your propose= d RFC.\ >=20 > And they should be errors in Hack too. The reason they aren't are to ea= se transitions from PHP to Hack. I'd expect them to be more strongly type= d eventually. Right, you are doing a gradual transition of an API that wasn't written to be strict. It was written with the assumption that type coercion would take place. If there is a good reason to ease the transition from PHP to Hack there is an even stronger reason to ease the transition from PHP to PHP. -Rasmus --TU2fVk9QXSRNM6qt87vh7CivKALeLMjdi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTng94ACgkQlxayKTuqOuDkhgCePsMX/kFw8H5GXms3XTMYGoop OBAAn3yTY294HIzG0Ny9piUZvzI6ovsp =Alkg -----END PGP SIGNATURE----- --TU2fVk9QXSRNM6qt87vh7CivKALeLMjdi--