Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80052 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41493 invoked from network); 1 Jan 2015 15:59:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jan 2015 15:59:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:65051] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/CC-60454-BFE65A45 for ; Thu, 01 Jan 2015 10:59:56 -0500 Received: by mail-lb0-f173.google.com with SMTP id z12so14440492lbi.18 for ; Thu, 01 Jan 2015 07:59:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Q7kYUW16P10SEIPOsqsXsguaudoTMF9+uZRluVeqF6M=; b=aJ9p3JR1IgwEaystpfM/Ufj64EUGWGb7TluzQAKGblXAyO18IMe1QpBDnhwzQYPgph 86AcJX2osonTxu36h8zuyxrBCDLchTUqkkEGSJ7nt5nrsgs/GwOEhlmRkd5er2FOB6dj Op7E44wIyrDkeB5bMhfOus5+BjSyPp1bPn/lgsafIJIWn6AZLqbEJW7XSZyRW8xmWg8E NwmUk1O8Y/vtzGuNptoJlqChlw7jfsjMP9tCIPUKANylBQDNc1fuO+9i7k+Mzq8UydPz UroJw82fNtmjoKA7kowT6GHtPrEYIyPuNjnSNpZ5Mt/SroIRUIBCGKCr2O6wrVdCsAgG eOfA== X-Received: by 10.152.27.130 with SMTP id t2mr70341132lag.28.1420127992161; Thu, 01 Jan 2015 07:59:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.21.101 with HTTP; Thu, 1 Jan 2015 07:59:30 -0800 (PST) Reply-To: marcio3w@gmail.com In-Reply-To: References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> Date: Thu, 1 Jan 2015 12:59:30 -0300 Message-ID: To: Andrea Faulds Cc: Nikita Popov , PHP Internals Content-Type: multipart/alternative; boundary=089e0160b6d0822cee050b99502a Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: marcio.web2@gmail.com (Marcio Almada) --089e0160b6d0822cee050b99502a Content-Type: text/plain; charset=UTF-8 The battle between strict type declarations vs coercive has been here for a while. My problem with coercion in detriment of strictness is that sometimes you DON'T WANT TYPE CASTING AT ALL. This new feature would create serious impediments. So I wonder if we couldn't have both (strict and coercive types declarations) and leave the current proposed type hinting syntax reserved for strict type declarations? Like in: function(int $a, (int) $b) { // $a will be strict // $b will be type casted } This way we can actually choose when to cast and when to be strict and both features could be voted independently without affect each other possible future adoptions. --089e0160b6d0822cee050b99502a--