Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82989 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98547 invoked from network); 17 Feb 2015 17:12:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 17:12:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; 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:40980] helo=mail-pd0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/16-19463-D6673E45 for ; Tue, 17 Feb 2015 12:12:15 -0500 Received: by pdno5 with SMTP id o5so45026863pdn.8 for ; Tue, 17 Feb 2015 09:12:10 -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=W58ES3kKfoFmNpdD9CCpjeNEZe25nzHG7/SyxBiO3tM=; b=k0oZxoExlo64sSuDHrxPQ++OBsxbWsCXHSkQ/8p2qL8wXbUaJcXohVSDUpsCjJ945b ea5eJoK/5wSA1GRsfbeY3MD0O/kdV6tzYIrGSQ+zjiDMlF7c5obXf4mvT4gnQHid1wXq LxkNloTTL1w4OBHKEE//zf8FGbJAI0/Kwxvr7VzxogFoyPt4qVWoWI0+rF3blTAvl9Yw LvWj53jCm7Xgy6VYPHHIorkIJ7Q0/ljLAe41YyzLEheFR86NVgO+vcIJzIQyKZA9OM9M aAZRj6BpkXrdw695J3a/2XTNRLRY5peA//GMQUrto6e2xK8bBGyUUwOnOAhD2weaXZsB 8KUQ== X-Gm-Message-State: ALoCoQm2Dy7bmfe7ANw7Min50NhPR9INDWosi9seU/wTYsZOwQIZYFyUPW33/Kad4ToOSacTP4Kn X-Received: by 10.68.135.97 with SMTP id pr1mr51101143pbb.71.1424193130875; Tue, 17 Feb 2015 09:12:10 -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 ah1sm18394286pad.16.2015.02.17.09.12.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 09:12:10 -0800 (PST) Message-ID: <54E37669.9060805@lerdorf.com> Date: Tue, 17 Feb 2015 09:12:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Sara Golemon CC: francois@php.net, Philip Sturgeon , Arvids Godjuks , Jefferson Gonzalez , Rowan Collins , PHP internals References: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <54E290E5.3020508@lerdorf.com> <54E2AD88.6040206@lerdorf.com> <54E2FA57.6050009@lerdorf.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="68ufnSCMFe8d81UF00oWx6KbPEKCGJsiQ" Subject: Re: [PHP-DEV] Reviving scalar type hints From: rasmus@lerdorf.com (Rasmus Lerdorf) --68ufnSCMFe8d81UF00oWx6KbPEKCGJsiQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/17/2015 08:38 AM, Sara Golemon wrote: > On Tue, Feb 17, 2015 at 12:22 AM, Rasmus Lerdorf w= rote: >> Please correct me here if I somehow ran these incorrectly. I did put >> some deliberate type errors into my userspace code and hh_client caugh= t >> those nicely, so it seems like it was working, but it didn't catch >> anything when it came to calling the internal API functions. >> > The mechanisms are strict, but the definitions, in hack, are untyped, > so there's nothing to validate: >=20 > hphp/hack/hhi/stdlib/builtins_string.hhi: > function number_format($number, $decimals =3D 0, $dec_point =3D ".", > $thousands_sep =3D ","); Right, so most of the internal API functions were omitted from strict typing in Hack it looks like except for some places where it made sense to selectively apply stricter checks. The RFC as it stands doesn't give us this option which is my major problem with it. > Perhaps a ZEND_ACC_STRICT flag which lets an API opt-in to strict mode?= > Or something passed to the arg_info struct? The details are secondary, > but you get my meaning... Yes, something along those lines to allow gradual and selective strictnes= s. The internal/extension api is just another library and the authors of these library functions should have the same allowance as userspace library authors. Like you said in one reply, "What's yours is yours, what's theirs is theirs." -Rasmus --68ufnSCMFe8d81UF00oWx6KbPEKCGJsiQ 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 iEYEARECAAYFAlTjdmkACgkQlxayKTuqOuBFlQCeML97Qb84zm3vG5axFfum1E3/ 9OEAn2hv7lSNEiCFB+ozweZdAIv7O9Vo =zcIA -----END PGP SIGNATURE----- --68ufnSCMFe8d81UF00oWx6KbPEKCGJsiQ--