Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92307 invoked from network); 13 Jul 2014 05:22:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2014 05:22:28 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.107 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.107 smtp107.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.107] ([108.166.43.107:37500] helo=smtp107.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/01-14675-29712C35 for ; Sun, 13 Jul 2014 01:22:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp14.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id B4D7418038E; Sun, 13 Jul 2014 01:22:23 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp14.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 6100D1802E3; Sun, 13 Jul 2014 01:22:23 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.4); Sun, 13 Jul 2014 05:22:23 GMT Message-ID: <53C2178E.7070705@sugarcrm.com> Date: Sat, 12 Jul 2014 22:22:22 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrea Faulds , PHP internals References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> In-Reply-To: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > PHP’s type hinting system is rather incomplete as it does not support > scalars, only arrays, callables and objects. In 2012, Anthony Ferrara > created an RFC which proposed type hinting for scalar types (int, > float, bool, string and resource) with casting, with behaviour nearly > the same as that of zend_parse_parameters. Sadly, he later left PHP > internals and withdrew his RFCs. I have one request: could we please stop calling it "hinting"? The dictionary says (http://www.thefreedictionary.com/hint) that the word "hint" means: 1. A slight indication or intimation: wanted to avoid any hint of scandal. 2. a. A brief or indirect suggestion; a tip: stock-trading hints. b. A statement conveying information in an indirect fashion; a clue: Give me a hint about the big news. 3. A barely perceptible amount: just a hint of color. What we have in PHP and what is being proposed it not a "slight indication", not "suggestion" and not "conveying information in indirect fashion" (what Python does in PEP-3107 could be called that way, but it's not what is proposed here). It is very direct specification of either strict parameter typing or coercive parameter typing. I don't think using confusing terminology helps anything here. I think it was a mistake to introduce this term from the start and we should stop propagating it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/