Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63492 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11860 invoked from network); 17 Oct 2012 10:22:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2012 10:22:59 -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:51632] helo=smtp143.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/96-64689-2078E705 for ; Wed, 17 Oct 2012 06:22:59 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp44.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 78458128749; Wed, 17 Oct 2012 06:22:56 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp44.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 3AB3F12865C; Wed, 17 Oct 2012 06:22:55 -0400 (EDT) Message-ID: <507E86FD.8060401@sugarcrm.com> Date: Wed, 17 Oct 2012 13:22:53 +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: Levi Morrison CC: Amaury Bouchard , Rasmus Lerdorf , Clint Priest , "internals@lists.php.net" , "Nikita Popov (nikita.ppv@gmail.com)" References: <9570D903A3BECE4092E924C2985CE485612B6434@MBX202.domain.local> <507D133A.4040701@sugarcrm.com> <507D801E.7070508@lerdorf.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! > It is foolish to think that these two bits of code are behaviorally different: > > class Entity { > DateTime $last_modified; > } The are different because this one looks like a strongly typed variable which brings with it a lot of connotations which aren't immediately obvious, and in fact most of this is not needed. 99% of use of parameter typing I've seen is done for purely documentation purposes and that code would break hard if these types do not match but in the code they never do since there are no other types that end up there. I think having the engine run a lot of extra code just for the sake of documentation is not right. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227