Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52060 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15197 invoked from network); 28 Apr 2011 16:38:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2011 16:38:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=mail_ben_schmidt@yahoo.com.au; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mail_ben_schmidt@yahoo.com.au; sender-id=unknown; domainkeys=good Received-SPF: error (pb1.pair.com: domain yahoo.com.au from 98.139.53.212 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mail_ben_schmidt@yahoo.com.au X-Host-Fingerprint: 98.139.53.212 nm19-vm0.bullet.mail.ac4.yahoo.com Received: from [98.139.53.212] ([98.139.53.212:34367] helo=nm19-vm0.bullet.mail.ac4.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/B1-03888-C0899BD4 for ; Thu, 28 Apr 2011 12:38:37 -0400 Received: from [98.139.52.189] by nm19.bullet.mail.ac4.yahoo.com with NNFMP; 28 Apr 2011 16:38:34 -0000 Received: from [98.139.52.150] by tm2.bullet.mail.ac4.yahoo.com with NNFMP; 28 Apr 2011 16:38:34 -0000 Received: from [127.0.0.1] by omp1033.mail.ac4.yahoo.com with NNFMP; 28 Apr 2011 16:38:34 -0000 X-Yahoo-Newman-Id: 387651.89302.bm@omp1033.mail.ac4.yahoo.com Received: (qmail 92912 invoked from network); 28 Apr 2011 16:38:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=XtzW/IpTq4i4kS5rguupeCoMExemWaxlNk/Fcwo1y2nUCYw3iIgVZ0Wi4Sfv/+h/aAIWdnaqLnrXct2nKjQ/3HIcO0gYzFC4hwD7fH0RHfSJD/bpu8QU8alv10gbwN3jcSO1D1MeKjeuHW/IwX3b+j3EfbTgyAZDMME6PC/FUSQ= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1304008713; bh=Lk8oTdczd3bAJZUeG3uH/ZN58P6Un+wbcZ02yuphprU=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Xuf9hy65X4HiT7OpFl/dD9rfdWTwrCqoAWbIrZZ4OL5q50FBcU+3BvLPbgxrDLl/AhMsFdCvyUL+fA98CvDpLElq2WRJc70CGUbd+eeRf1HJus4XkgVqXcw2IOz3QRAquEZKxdmRCD4gsVMOeICGuWkcDRqBiPhHGzihhlpEmVc= Received: from thought.local (mail_ben_schmidt@124.168.81.69 with plain) by smtp132.mail.mud.yahoo.com with SMTP; 28 Apr 2011 09:38:33 -0700 PDT X-Yahoo-SMTP: enFMnPSswBAexaHyzgobwuUTrYOhZdJ0KRA2SjA- X-YMail-OSG: Ega4bxIVM1khNvcqub1Jt6.Qnj3tYBrUZHweFC7FitY29AA xw6lSn5dr9ppAI7LbaSE_rWcoW3PjQ8fsRfQ93e.EC.UV.PA9k1c4ap1iMW3 sT3D7GinRkI7QSTBL4lX9rugwkW8h6s_So6dG81GFUmLZNq.qPjqjrrTnTBj ntCQBBdA.A4h0W8LKFlaxNGzveBFencnnQz7ubSItJahnelOBtkTKl1kpapY 1lWLXkCMZDktTNsvVaOQ.iQiVve01KbctYCUJR9fe._QOqKUA3Q7_g6btWWc OUnnAyAPIz_2.laylLoeLRrAKpAiGn60fTNTc3.911DLpVBEkQaxctWoUzJc Op2IdH0xCJDUM_0cdqY6YeXsL X-Yahoo-Newman-Property: ymail-3 Message-ID: <4DB99807.20408@yahoo.com.au> Date: Fri, 29 Apr 2011 02:38:31 +1000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: internals@lists.php.net References: <4DB923E6.3020307@sugarcrm.com> <4DB98E8A.409@yahoo.com.au> <20110428161043.GX8496@phcomp.co.uk> In-Reply-To: <20110428161043.GX8496@phcomp.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Return type-hint From: mail_ben_schmidt@yahoo.com.au (Ben Schmidt) On 29/04/11 2:10 AM, Alain Williams wrote: > On Fri, Apr 29, 2011 at 01:58:02AM +1000, Ben Schmidt wrote: > >> If PHP were compiled, not interpreted, i.e. less dynamic, there could be >> some benefits, as compile-time optimisations could perhaps be built in, and >> validations skipped if they were provably unnecessary. But that's not going >> to happen any time soon, as far as I'm aware. > > It has already happened: > > https://github.com/facebook/hiphop-php/wiki/ > > It might also be useful for reflection. *Hastily retracts comment.* That is very cool. I should give it a try. I also see the value of such type checking for such a use case, obviously. I guess there's a reason for it after all. I'd still like to see something neat to handle more than just named classes, though, e.g. scalars, and things like "false on error" for return values. Ben.