Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76138 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36570 invoked from network); 25 Jul 2014 19:41:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2014 19:41:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.83 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.83 smtp83.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.83] ([108.166.43.83:33468] helo=smtp83.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/BA-08559-CC2B2D35 for ; Fri, 25 Jul 2014 15:41:04 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp11.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A16BC180875; Fri, 25 Jul 2014 15:41:04 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp11.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 4BB76180877; Fri, 25 Jul 2014 15:41:04 -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.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.10); Fri, 25 Jul 2014 19:41:04 GMT Message-ID: <53D2B2CF.5060705@sugarcrm.com> Date: Fri, 25 Jul 2014 12:41:03 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Andrea Faulds CC: "internals@lists.php.net" References: <20A80B2E-42BB-486F-8F83-A6FDBEBA4056@ajf.me>,<5B708D89-B208-4644-BC89-1B7AE98A99BA@ajf.me> <6A40E21F-D265-4ADC-AD79-4EDB7AB45A01@ajf.me> <53D2AE01.8020806@sugarcrm.com> <253874AE-F389-4357-8FBD-7135C02BD797@ajf.me> In-Reply-To: <253874AE-F389-4357-8FBD-7135C02BD797@ajf.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > The point of this RFC is to strike a compromise that is generally > useful rather than helping one specific use case (strict hints) or > another (casts). What you call "compromise" is the inconsistency - it's not strict typing, it's not weak typing, it's half that and half this without any apparent principle uniting them but arbitrarily constructed table, to which anybody using it would have to constantly refer to figure out why their code is breaking. I'm sure you carefully thought about each and every cell in that table, but that does not make it any better for the user - in fact, it makes it worse, since absent the obvious uniting principle it means each time the user encounters it it has to reconstruct the long and laborious thought process anew or just learn the whole table by hard. It is not a good design. Good design is where you can predict what the language would do without remembering a bunch of exceptions that are just so. Even worse, it does not match what other functions are doing and what other type conversions are doing. It's like a "compromise" of cutting the baby in half - much worse than any of the original proposals. Only in the case of Solomon it was a trick, you on the other side propose it as a serious and preferable solution. This kind of "compromise" is not a positive thing, but a negative. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/