Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78029 invoked from network); 11 Aug 2010 10:52:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2010 10:52:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 209.85.161.42 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:59033] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/61-04429-3E0826C4 for ; Wed, 11 Aug 2010 06:52:20 -0400 Received: by fxm14 with SMTP id 14so1422469fxm.29 for ; Wed, 11 Aug 2010 03:52:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.103.72 with SMTP id j8mr19781481fao.4.1281523936811; Wed, 11 Aug 2010 03:52:16 -0700 (PDT) Received: by 10.223.6.28 with HTTP; Wed, 11 Aug 2010 03:52:16 -0700 (PDT) In-Reply-To: <7.0.1.0.2.20100811085214.0f024300@zend.com> References: <1281478269.6608.292.camel@guybrush> <4C61D6FB.6030108@sugarcrm.com> <7.0.1.0.2.20100811085214.0f024300@zend.com> Date: Wed, 11 Aug 2010 06:52:16 -0400 Message-ID: To: Zeev Suraski Cc: Stas Malyshev , =?ISO-8859-1?Q?Johannes_Schl=C3=BCter?= , Kalle Sommer Nielsen , Internals , Derick Rethans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Strict typing (was: Typehints) From: ilia@prohost.org (Ilia Alshanetsky) 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. -1 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 ignore= d >> 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 mo= re > support for 'weak' typing then there was for strict typing. > > The response to Johannes's blog also don't leave much room for speculatio= n > 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 - th= e > 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 them= e > 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 cas= e > 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 typin= g, > 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 doe= sn'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 > >