Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84477 invoked from network); 13 Jul 2012 17:01:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2012 17:01:23 -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 67.192.241.133 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.133 smtp133.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.133] ([67.192.241.133:35578] helo=smtp133.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/3A-17670-16450005 for ; Fri, 13 Jul 2012 13:01:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp13.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 6EC5C3D04BE; Fri, 13 Jul 2012 13:01:18 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp13.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 203C43D0478; Fri, 13 Jul 2012 13:01:18 -0400 (EDT) Message-ID: <5000545D.1000801@sugarcrm.com> Date: Fri, 13 Jul 2012 10:01:17 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Matthew Weier O'Phinney CC: "internals@lists.php.net" References: <4FFEFBB3.7090507@sugarcrm.com> <4FFEFD81.6020404@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Iterable Type Hint From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I wouldn't call it ad hoc, actually, but more a recognition of what practices > and patterns are now occurring. A few years ago, I'd have type-hinted on array I do not think strict typing is a right way to do it. Strict typing has specific meaning in many languages, including (unfortunately, IMHO) in PHP - that the value has specific type. (Ab)using it to mean "the value conforms to specific multi-type use case" seems not the right way to me, unless we design very different type system from what we have now - but even then we should start with designing it, not with ad-hoc use cases. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227