Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68089 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64905 invoked from network); 10 Jul 2013 09:36:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2013 09:36:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=nek.dev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nek.dev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.52 as permitted sender) X-PHP-List-Original-Sender: nek.dev@gmail.com X-Host-Fingerprint: 209.85.215.52 mail-la0-f52.google.com Received: from [209.85.215.52] ([209.85.215.52:56811] helo=mail-la0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/22-50933-90B2DD15 for ; Wed, 10 Jul 2013 05:36:11 -0400 Received: by mail-la0-f52.google.com with SMTP id fo12so5462534lab.25 for ; Wed, 10 Jul 2013 02:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=l6SlTGh7uB/pVPZ4v3sKuSfa/IoJzvPvhwhYLR1YxPs=; b=yJIGXm5smomugWGEqFbldLei9YpKy6NRG/w1upFSGS/KLnZ4InvIv1TxyypvBHl+hX X1IPxzToO3p8f3qCdRFxQvC+yfzh3/GjhFyt3Sod+qbEhODcDBGi8vbH4asc/upntfSt dJ5fUd9cGJOti7rfaOhsOWuU1dSsveiFrgjGwW6WZtPArqt73U5IWQXeMn3hPhNU2KF3 2Aj32ULf9PnB/IkDWEVBXIxvsEryFcvXRghHeWWQiyx5wFDgphNIGuvsN8lAQHEbIfh+ w/PbXczMo88qv0zBYI8FlHobBUbqyDXpT8Ha9TiKtVtdXNAUEmeSzH9DGNQhrQjZvPpY 5Fwg== MIME-Version: 1.0 X-Received: by 10.152.44.133 with SMTP id e5mr14931119lam.15.1373448966310; Wed, 10 Jul 2013 02:36:06 -0700 (PDT) Received: by 10.114.176.138 with HTTP; Wed, 10 Jul 2013 02:36:06 -0700 (PDT) Received: by 10.114.176.138 with HTTP; Wed, 10 Jul 2013 02:36:06 -0700 (PDT) In-Reply-To: References: <1372258135.2410.22.camel@guybrush> Date: Wed, 10 Jul 2013 11:36:06 +0200 Message-ID: To: Florin Patan Cc: Julien Pauli , Sherif Ramadan , Ferenc Kovacs , Maxwell , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , "internals@lists.php.net" , Patrick ALLAERT , Sara Golemon Content-Type: multipart/alternative; boundary=089e0160a478c1108304e125011d Subject: Re: [PHP-DEV] Request for comments - new PHP feature: return typing From: nek.dev@gmail.com (Maxime Veber) --089e0160a478c1108304e125011d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I'm new with php internal. Here is my first answer but i use php everyday. I think that the return type is needed in php. When you make an interface, why are you not sure of the return of the function made by the user ? Of course you can specified it as comment but if you want to be sure of the return you have to test it and when the class is implementing your interface... That's definitively weird, isn't it? I use PHPStorm (and I'm probably not the only one here, haha) and love so much the warning when I'm wrong with return type. Why is it a feature of phpstorm and not of the language ? Weird. Again. I hope i help ! Bye. Le 10 juil. 2013 10:08, "Florin Patan" a =E9crit : > On Wed, Jul 10, 2013 at 1:42 AM, Sara Golemon wrote: > > I know this conversation kinda stopped a couple weeks ago, but I want t= o > > throw into the ring that HHVM already has a syntax for return type > hinting > > and it'd be awesome if we (with my PHP hat on) brought the two > > implementations together rather than take them further apart. > > > > In HHVM's case a function might look something like: > > > > function foo(SomeClass $bar, int $baz) : bool { > > > > } > > > > Hi Sara, > > > Thanks for the input. > While playing with GO I did found that this type of syntax is a bit bette= r. > Since you brought up the discussion, would you think it would make > more sense to actually start and integrate HHVM into PHP rather that > patching it up? > Or better yet, rewrite it with a HH VM in mind? > I know and fully understand it's a gigantic task but at some point in > a software lifecycle there's only so much patching up you can do > before you can't patch it anymore. > Thanks. > > > Best regards, > Florin > ---- > Florin Patan > https://github.com/dlsniper > http://www.linkedin.com/in/florinpatan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --089e0160a478c1108304e125011d--