Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7486 invoked from network); 27 Jun 2013 17:18:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jun 2013 17:18:31 -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.115 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.115 smtp115.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.115] ([108.166.43.115:53696] helo=smtp115.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/6F-34034-6E37CC15 for ; Thu, 27 Jun 2013 13:18:31 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 7BBCD1B80CC; Thu, 27 Jun 2013 13:18:28 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp7.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 9722E1B8086; Thu, 27 Jun 2013 13:18:27 -0400 (EDT) Message-ID: <51CC73E2.5070201@sugarcrm.com> Date: Thu, 27 Jun 2013 10:18:26 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Anthony Ferrara CC: "internals@lists.php.net" References: <51C9FA9C.8050403@sugarcrm.com> <51CA1C93.6080500@sugarcrm.com> <51CA24C5.9090505@sugarcrm.com> <51CB167A.4020207@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Protocol Type Hinting From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > > I'm assuming that you do know the difference between > E_RECOVERABLE_ERROR and E_ERROR. And the difference is not trivial... Could you please explain what is the non-trivial difference relevant to this case and how it is relevant? Could you also explain why making undefined function produce E_RECOVERABLE_ERROR would not solve it? > But "good practice" vs "not-good-practice" shouldn't be a significant > factor, because your "good-practice" is different from In my opinion, it is the most significant factor. Good practices are very important to the language, because they are what turns the language into a community with common... well, language of expressing things. Otherwise it is just an assembly of loosely related hacks. > > Those other languages (all of them in fact) throw exceptions if the > function or method does not exist. PHP hard fatals. They Here it goes again - the exception thing. If you want to make PHP throw exceptions on errors, please write RFC on making PHP throw exceptions on errors (I have no idea how it would help you, but you are welcome to share it). Writing a different parallel typing system into PHP and linking it to duck typing in other dynamic languages which explicitly doesn't do what you claim it does and what your proposal does in not right way to approach it. Other dynamic languages - excepting Scala and couple of others, which are very unlike PHP in a lot of aspects including static typing - demonstrably do not do what you want to do. So if you say "look at other languages" - yes, we did and they call "duck typing" exactly what I described, not what you described. > So if you don't see the usefulness of this type of change, ask if you > maintain anything significant that fits that description. If you > don't, find someone who does and talk to them. Otherwise you may be > unfairly judging by ignoring problems that you personally don't have... Thank you for your advice, in my 20+ year career in software development and 10+ year career in PHP specifically I have has some experience with all kinds of problems. Now if you would like to kindly move from "you know nothing, Jon Snow" to more substantial arguments it'd be more productive. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227