Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34381 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1520 invoked by uid 1010); 4 Jan 2008 00:33:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1494 invoked from network); 4 Jan 2008 00:33:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 00:33:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 205.234.132.11 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 205.234.132.11 scottsdale.servershost.net Received: from [205.234.132.11] ([205.234.132.11:57916] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/38-20810-6CE7D774 for ; Thu, 03 Jan 2008 19:33:12 -0500 Received: from [208.58.196.175] (port=50900 helo=[192.168.1.92]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JAaUl-0007K6-70; Thu, 03 Jan 2008 18:33:07 -0600 To: Stanislav Malyshev Cc: Brian Moon , internals@lists.php.net In-Reply-To: <477D61F2.3080603@zend.com> 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> <477D58ED.6030101@zend.com> <477D5A8A.4080903@dealnews.com> <477D61F2.3080603@zend.com> Content-Type: text/plain Date: Thu, 03 Jan 2008 19:33:03 -0500 Message-ID: <1199406783.5889.10.camel@e-vectra> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scottsdale.servershost.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sambarrow.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: sam@sambarrow.com (Sam Barrow) It doesn't disable type conversion unless you specifically tell it to. Plus the fact that if it issues an E_WARNING, your application will not necessarily stop execution. On Thu, 2008-01-03 at 14:30 -0800, Stanislav Malyshev wrote: > > I don't get it. We already have type hinting, just not for scalars. The > > Type hinting for scalars is different because it disables one of the > features of PHP language - conversion of scalar types into each other. > > > So, can we switch the mundane conversation from "should we have type > > hinting" to "why don't we have scalar type hinting if we have non-scalar > > type hinting?" That is the real conversation. Type hinting is here. It > > These are different kinds of typing, with different consequences. You do > not convert DateTime into PEAR_Soap_Client routinely, nor such > conversion can make any sense at all, so distinguishing between them is > not the same as making hard distinction between integer and float and > string, and disabling conversion between them. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com >