Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80516 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24513 invoked from network); 15 Jan 2015 07:26:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 07:26:31 -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.216.176 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.216.176 mail-qc0-f176.google.com Received: from [209.85.216.176] ([209.85.216.176:56172] helo=mail-qc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/11-14306-6AB67B45 for ; Thu, 15 Jan 2015 02:26:31 -0500 Received: by mail-qc0-f176.google.com with SMTP id b13so88438qcw.7 for ; Wed, 14 Jan 2015 23:26:28 -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=Tal/PW7oP5JsYMmnNnZaC4flrU5Apa+3EpfuPQwN5dc=; b=GXyqQbyPZ+ZQM2f2VeB+a8b5uAuNfOEc1hgTVmsjXYFuchlMJgz/EDI1kQEmN2zfQw DlUVEFKMpR4JGp3nie4ZAfn1BWNl+4/g4BGA1cTIFhQLysEdREWoaLqm/40VsvBOOo5m PfOxvXs1IjOc2J24GCG/uwANyCuPTSAYStyTQQGYxNaIw/Rg0BrYEQtU5ABLwcf39Fnj /blHcjUzbHS/KagqdvMEIt3XQTvPpGZgeBxJrDIQhsWsgVcnLJ27jLTAlqZgpHekLKOh 4a62GzhD6HBoFrmYn3ctA7lm7QxRfB2z+caZj+aM5jbwvW0xbMlMUIoMJxVM87SYG6Y/ RHmQ== MIME-Version: 1.0 X-Received: by 10.140.23.210 with SMTP id 76mr13011847qgp.84.1421306788282; Wed, 14 Jan 2015 23:26:28 -0800 (PST) Received: by 10.96.55.138 with HTTP; Wed, 14 Jan 2015 23:26:28 -0800 (PST) In-Reply-To: References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> Date: Thu, 15 Jan 2015 08:26:28 +0100 Message-ID: To: Andrea Faulds Cc: Zeev Suraski , Richard Quadling , Leigh , PHP Internals List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) > On Wed, Jan 14, 2015 at 11:28 PM, Andrea Faulds wrote: > From what I can see, the larger PHP community is generally in favour of s= trict typing, and among them, the previous RFC revision was received quite = poorly. Myself, I might have been somewhat happy with just weak hints, but = it would upset an awful lot of developers who would like some measure of st= rict typing. Developers who would most likely not use the new scalar type h= ints, because they weren=E2=80=99t strict. And if nobody uses them, why add= them? Actually, what's the big difference, making weak typing worse and less useable? The people who write libraries are guaranteed either way that the input parameters for their methods will be of desired type in both cases. And the people who use them either can do the conversion themselves (in strong typing case) or let the language help with it for them (in weak typing case) - which is IMHO fine, as long as the conversions are kinda predictable and 100% documented. And yesterday I was pointed out one thing: the RFC states "With this approach, an argument is only accepted if its type is exactly the same as the parameter.". Does this mean you cannot pass integer to a function with float argument in the strict mode? Is it strong or strict, btw? I always thought it's supposed to be "strongly typed", but since I saw "strict typing" here used by everyone, I'm not sure now. Pavel Kouril