Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48435 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23076 invoked from network); 24 May 2010 15:58:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2010 15:58:01 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:52441] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/91-13219-602AAFB4 for ; Mon, 24 May 2010 11:58:01 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id F109A504D4; Mon, 24 May 2010 18:34:55 +0300 (IDT) Received: from ws.home ([10.1.10.32]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 May 2010 18:57:54 +0300 Message-ID: <4BFAA201.3000608@zend.com> Date: Mon, 24 May 2010 19:57:53 +0400 User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Stas Malyshev CC: internals@lists.php.net References: <7.0.1.0.2.20100522175819.0a601c68@zend.com> <65101.93.108.152.52.1274662417.squirrel@www.geleia.net> <7.0.1.0.2.20100524075150.16056330@zend.com> <4BFA147F.4090307@sugarcrm.com> In-Reply-To: <4BFA147F.4090307@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 May 2010 15:57:54.0733 (UTC) FILETIME=[DF1C85D0:01CAFB59] Subject: Re: [PHP-DEV] Type hinting From: dmitry@zend.com (Dmitry Stogov) Stas Malyshev wrote: > Hi! > >> I see three key options going forward: >> 1. Implement the table along the lines of what it looks like now, >> perhaps with minor changes. >> 2. Implement identical conversion rules to the ones that exist in >> PHP; That effectively turns type hinting into scalar casting >> operators (not saying that's a bad thing!) >> 3. Implement identical conversion rules to the ones that exist in >> PHP, except for when they really suck. Namely, lose the >> array->scalar conversions and silent conversions of non-numeric >> strings to numbers. > > I'm for 3, Array->scalar must die, as for non-numeric to numbers, I > don't have strong opinion as I see no point in it, IMO if it failed, I'd > be OK with it. > In case we remove 'Array->scalar' and others everywhere, #3 would be the same as #2. I'm for that. Thanks. Dmitry.