Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19382 invoked from network); 17 Oct 2012 11:08:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2012 11:08: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 207.97.245.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.143 smtp143.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.143] ([207.97.245.143:45917] helo=smtp143.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/F7-64689-3919E705 for ; Wed, 17 Oct 2012 07:08:04 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp44.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 93E67128746; Wed, 17 Oct 2012 07:08:01 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp44.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 866B01286A1; Wed, 17 Oct 2012 07:08:00 -0400 (EDT) Message-ID: <507E918E.6090206@sugarcrm.com> Date: Wed, 17 Oct 2012 14:07:58 +0300 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Nikita Popov CC: Amaury Bouchard , Levi Morrison , Clint Priest , "internals@lists.php.net" References: <9570D903A3BECE4092E924C2985CE485612B6434@MBX202.domain.local> <507D133A.4040701@sugarcrm.com> <507D2FB3.3030806@sugarcrm.com> <507D3D29.9070709@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I see this argument crop up with every typehint discussion and just > don't understand it at all. Why would you want to check the variable > type everywhere? You just assign it and if it doesn't work, then you > get an error. Just like it should be. I mean, do you seriously check No, you don't get an error. You'd get an error in compiled language. In dynamic language, your client gets an error when his site is launched and instead of happy launch his users get white screens. To avoid that, you'd need to add checks - or just ship it as is and hope your unit tests were as good as you hoped they are (which they never are). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227