Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10224 invoked from network); 11 Aug 2010 13:40:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2010 13:40:51 -0000 Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Received: from [63.205.162.117] ([63.205.162.117:51945] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/41-01618-268A26C4 for ; Wed, 11 Aug 2010 09:40:51 -0400 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 460002DEBA; Wed, 11 Aug 2010 07:05:11 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Aug 2010 06:40:45 -0700 Message-ID: <698DE66518E7CA45812BD18E807866CE045E642E@us-ex1.zend.net> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Strict typing (was: Typehints) Thread-Index: Acs5Q21xLLt43DA+RXKrHA1ghBcbnQAFznIg References: <1281478269.6608.292.camel@guybrush><4C61D6FB.6030108@sugarcrm.com><7.0.1.0.2.20100811085214.0f024300@zend.com> To: "Ilia Alshanetsky" , "Zeev Suraski" Cc: "Stas Malyshev" , =?iso-8859-1?Q?Johannes_Schl=C3=BCter?= , "Kalle Sommer Nielsen" , "Internals" , "Derick Rethans" Subject: RE: [PHP-DEV] Strict typing (was: Typehints) From: andi@zend.com ("Andi Gutmans") I wouldn't mind living with neither but I think it's two separate = discussions. > -----Original Message----- > From: Ilia Alshanetsky [mailto:ilia@prohost.org] > Sent: Wednesday, August 11, 2010 3:52 AM > To: Zeev Suraski > Cc: Stas Malyshev; Johannes Schl=C3=BCter; Kalle Sommer Nielsen; = Internals; > Derick Rethans > Subject: Re: [PHP-DEV] Strict typing (was: Typehints) >=20 > I think that weak type-hinting defeats the whole purpose of the = feature and I > would rather not have it than have a non-obvious implementation. >=20 > -1 >=20 > On Wed, Aug 11, 2010 at 2:03 AM, Zeev Suraski wrote: > > At 01:47 11/08/2010, Stas Malyshev wrote: > >> > >> Hi! > >> > >>> For the record: I consider the current implementation as (one of) > >>> the biggest mistakes in the last ten years. > >> > >> I agree completely. The fact that obvious absence of consensus is > >> ignored and we are releasing feature that clearly has no consensus > >> behind it as a part of an official release - when we have killed = much > >> lesser things for much lesser reasons - I think it is a very bad = development. > > > > I agree completely too. > > > > We've also had quite a lengthy discussion on this topic, and there = was > > more support for 'weak' typing then there was for strict typing. > > > > The response to Johannes's blog also don't leave much room for > > speculation regarding what the community at large thinks. > > > > Facts: > > - When we introduced type hints, one of the 'conditions' were that > > we'll never, ever have type hints for scalars - for many different > > reasons - the strongest of which it simply doesn't fit PHP's theme. > > - We managed to come up with an alternative solution, in the form of > > auto-converting type hints for scalars, which does in fact fit PHP's > > theme perfectly. > > - I suggested we actually take the opportunity to slightly modify > > PHP's conversion rules in esoteric cases, where our historical > > decision is probably not the right one (e.g., silently converting > > "abc" into 0 in case of integer context - instead emit a new E_TYPE > > warning that would be off by default). > > > > My view in terms of preferences: > > #1 - Auto-converting type hints + minor changes to PHP's conversion > > rules > > #2 - Auto-converting type hints > > #3 - Doing nothing > > #inf - Introducing strict typing into PHP (current trunk status) > > > > As Stas said - there's clearly anything but consensus around strict > > typing, so our 'default' in case we can't reach agreement is #3 - = the status > quo. > > =A0As everyone told me when this feature was committed to trunk - = "it > > doesn't mean anything, it's just trunk". =A0Let's stand behind that > > statement and revert it. > > > > Strict typing should go away before any 'official' package comes out > > of php.net. > > > > Zeev > > > > -- > > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > > visit: http://www.php.net/unsub.php > > > > >=20 > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, = visit: > http://www.php.net/unsub.php