Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82088 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98982 invoked from network); 7 Feb 2015 10:57:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2015 10:57:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.47 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.192.47 mail-qg0-f47.google.com Received: from [209.85.192.47] ([209.85.192.47:48756] helo=mail-qg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/E0-27738-78FE5D45 for ; Sat, 07 Feb 2015 05:57:11 -0500 Received: by mail-qg0-f47.google.com with SMTP id l89so15064841qgf.6 for ; Sat, 07 Feb 2015 02:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/YQDM4IsUdfHTyUBV9hGV85Sl1zthGZpR3BnuvZwQZQ=; b=JYn7K1rNAeqQ7msz0tzSB9nvjS/NezPbuvnLiW31K6WJOmmFupE+3ytypKkG9eTlSn xvjFb72Z506zuBWXu/f96/BHnqf/U8udCOAj8hKz61OvkqXXb1DT1rqSnxXWsQ8R/tdc n3wbvC7gAqhTl/kqG1QLlXfOufukBtAzz2DjMdgUYAkEcHGtMJBIKLhD1gqxmlMrmQfl BWFU+C87iH2VGggqM64Bky7Qdb46HY+D+aGSD5nfyf0PDlEbW8pbQdAsbEQkhj5gz27Z mAFipXL6tZlNccsyYZdRZN/ZAw9Pb1+iYx3ZAeOzjW+D3E+3djZDxXjfSLlTiDMdMRfG BLxg== MIME-Version: 1.0 X-Received: by 10.140.93.73 with SMTP id c67mr14459891qge.53.1423306629232; Sat, 07 Feb 2015 02:57:09 -0800 (PST) Received: by 10.96.66.201 with HTTP; Sat, 7 Feb 2015 02:57:09 -0800 (PST) In-Reply-To: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> Date: Sat, 7 Feb 2015 11:57:09 +0100 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Thu, Feb 5, 2015 at 9:14 PM, Andrea Faulds wrote: > Good evening, > > At long last, I=E2=80=99m going to put the RFC to a vote. It=E2=80=99s be= en long enough - I don=E2=80=99t think there needs to be, or will be, much = further discussion. > Hello, I just realized it now (I brought it up in a different manner when there was discussion about the RFC), but I didn't notice there was a totally false statement about it in the RFC itself. You probably should fix it. I'm speaking about the "Strict type checking, which is used by many popular programming languages, particularly ones which are statically-typed, such as Java, C#, Haskell, or Facebook's Hack. It is also used for non-scalar parameter type hints in PHP. With this approach, an argument is only accepted if its type is exactly the same as the parameter." paragraph. This is NOT true (at least for C# and Java), as you can read here in the documentations of respecitve languages so you should not compare the strict version of the typing implemented in PHP with other strongly typed languages, because the PHP's "strict" is stricter than strongly static typed languages. I really hope noone voted with the thought that the strict typing acts as it does in Java and C#. https://msdn.microsoft.com/en-us/library/y5b434w4.aspx http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.2 Regards Pavel Kouril