Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39779 invoked from network); 11 Aug 2010 06:09:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2010 06:09:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=simpleshot@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=simpleshot@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: simpleshot@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:48841] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/88-20356-1AE326C4 for ; Wed, 11 Aug 2010 02:09:38 -0400 Received: by eyh6 with SMTP id 6so4655779eyh.29 for ; Tue, 10 Aug 2010 23:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=wYZWMVqxnxYOWgnFG9VZURF1aYy/tFwrjP1qSZJdJF4=; b=tp7JOS1NdC8UKefFcXBplOuwgrXYxh221uLWwjFJ3nr3kpTL4HvD3+XBO1yHhYiOsu DFa7qNcLqeexBYc10UT5npKY4g3btuMiDtEN29hi/vYVxsJFTC2exaALtKTCeJBn25u8 J6U1b6z1J3t/DvHjvOu0csxTh6rTZJKjHEjNE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=wilgv3jRcxF4ad+UwL7BJOa+DKdDd2nag6M0ZyWWngiLIcRJvI7Dsr6A1Kif2Ma/f6 8hcRx9YmCBgdAMsMtBQ92IfENAw/VBpgvXi3Y839aX1S8ugejO6M1r+9gwh0bzbIt8+f 9jVP5qy85Sa1rNdAPtqinUEEo/MLcorU3Y7uU= MIME-Version: 1.0 Received: by 10.213.36.18 with SMTP id r18mr5370234ebd.74.1281506974398; Tue, 10 Aug 2010 23:09:34 -0700 (PDT) Received: by 10.213.2.142 with HTTP; Tue, 10 Aug 2010 23:09:34 -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 02:09:34 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015174be6a8fc795d048d86171a Subject: Re: [PHP-DEV] Strict typing (was: Typehints) From: simpleshot@gmail.com (Adam Richardson) --0015174be6a8fc795d048d86171a Content-Type: text/plain; charset=ISO-8859-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 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. > As everyone told me when this feature was committed to trunk - "it doesn't > mean anything, it's just trunk". Let'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 > > +1 (All of what Zeev said) -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com --0015174be6a8fc795d048d86171a--