Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44885 invoked by uid 1010); 3 Jan 2008 21:51:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44870 invoked from network); 3 Jan 2008 21:51:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2008 21:51:47 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:7488] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/1E-20810-2F85D774 for ; Thu, 03 Jan 2008 16:51:47 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Jan 2008 23:51:44 +0200 Received: from [192.168.16.90] ([192.168.16.90]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 3 Jan 2008 13:51:40 -0800 Message-ID: <477D58ED.6030101@zend.com> Date: Thu, 03 Jan 2008 13:51:41 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Sam Barrow CC: internals@lists.php.net References: <200801031903.01980.tomi@cumulo.fi> <1199380881.15292.11.camel@sbarrow-desktop> <20080103172813.GQ7861@mint.phcomp.co.uk> <477D2B40.9010302@fischer.name> <477D2CDB.3000005@zend.com> <477D452A.9090906@zend.com> <1199392531.15292.64.camel@sbarrow-desktop> <477D4ACF.3030006@zend.com> <1199395138.15292.72.camel@sbarrow-desktop> In-Reply-To: <1199395138.15292.72.camel@sbarrow-desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Jan 2008 21:51:40.0812 (UTC) FILETIME=[D2A124C0:01C84E52] Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: stas@zend.com (Stanislav Malyshev) > There aren't two code models here at all. You can have a function > parameter, or you can have a type-enforced function parameter. PHP So now to use such function you'd have to check your variables for typing - otherwise your application blows up. And the type-checking should be total - otherwise you miss some call to some function or some code path bringing wrong value and your application blows up at runtime - since static type checking is not available. Meaning, unless all of your code is type-enforced, you'd have to write a wrapper around each type-enforced function manually checking that wrong value didn't get in. But you can do the same checks now, so what is the added value? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com