Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62171 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1280 invoked from network); 15 Aug 2012 08:36:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2012 08:36:31 -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 67.192.241.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.123 smtp123.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.123] ([67.192.241.123:58280] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/01-30529-E8F5B205 for ; Wed, 15 Aug 2012 04:36:31 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp12.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 34CBC3C1346; Wed, 15 Aug 2012 04:36:28 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp12.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 71FAB3C133B; Wed, 15 Aug 2012 04:36:27 -0400 (EDT) Message-ID: <502B5F8A.5000500@sugarcrm.com> Date: Wed, 15 Aug 2012 01:36:26 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Stan Vass CC: "internals@lists.php.net" References: <502A86AA.2030203@sugarcrm.com> <502B57AE.4070801@sugarcrm.com> <502B5C7F.1070708@sugarcrm.com> <6D84602D0F514FA3B82C11DBAF58AA53@pc> In-Reply-To: <6D84602D0F514FA3B82C11DBAF58AA53@pc> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Inline typecasting / typehinting for classes and interfaces From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Let me ask you - do you think the existing PHP typehints are pointless too? > Do you feel they don't give you enough flexibility? Do you feel they > reinvented a language construct for the purpose of saving the typing of one > if clause (per argument) (per method) (per class)? They are not pointless, but I think they are often misunderstood and not used correctly. And they definitely lack flexibility in many cases. But they are helpful for one important thing - defining interface between the method and the method client. Having strictly typed variables does not serve it, and trying to make PHP into half-baked half-statically-typed language does not sound like a good idea to me. > And why do you keep ignoring the fact that IDE's need additional clutches to > understand the type of the variable? Because I don't think inventing language constructs for the purpose of helping IDEs simulate static typing in dynamically typed language makes much sense. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227