Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37235 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44843 invoked from network); 25 Apr 2008 19:25:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2008 19:25:02 -0000 Authentication-Results: pb1.pair.com header.from=quickshiftin@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=quickshiftin@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.158 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: quickshiftin@gmail.com X-Host-Fingerprint: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:44822] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/2F-18287-C0032184 for ; Fri, 25 Apr 2008 15:25:01 -0400 Received: by fg-out-1718.google.com with SMTP id 22so3393291fge.23 for ; Fri, 25 Apr 2008 12:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=TkklgntCSfGOsR4X2uP+6WUXTl2dGN6gNaKPKnp/jNI=; b=tGIfppSPSn0OMBMdZ5LvGyF/pFXCakoReaUQ8+/1lOvjFeMf9F0dp+s2yOvbhPNlm9f7ZJlKeof+6SrbmEz8ltysST7s00X3RYB+KZF2z3KewnnJNYEKO7cxaRqhNTGNAnooI3tVzI2gqkhZomoyK7zVYq/ztiLrj0xBS8N7lQ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YId4qlRQR5CR8fsU/9SFNkPiep6G1yMV86db0O22RzogUQL3lHDQacwvC8a+0X1URMpQQOCwUqgkR8s3IXmO1msctfxXqLKTa1k70sGaUAgOBGV8r0kwKRfJDvgyKjro6q1QXxuyg6k1surah7z8qLByqM4kW+v+g2ILt19wtw8= Received: by 10.86.66.19 with SMTP id o19mr2241267fga.10.1209151497078; Fri, 25 Apr 2008 12:24:57 -0700 (PDT) Received: by 10.86.59.15 with HTTP; Fri, 25 Apr 2008 12:24:56 -0700 (PDT) Message-ID: <7dd2dc0b0804251224s750679acn169637efbd8653fa@mail.gmail.com> Date: Fri, 25 Apr 2008 13:24:56 -0600 To: "Sam Barrow" Cc: "Jeremy Privett" , "Alain Williams" , internals@lists.php.net In-Reply-To: <1209150944.20639.24.camel@sbarrow-desktop> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2899_28166711.1209151497069" References: <1209137410.6642.9.camel@sbarrow-desktop> <1209147362.20639.7.camel@sbarrow-desktop> <20080425182341.GB14490@mint.phcomp.co.uk> <1209149047.20639.18.camel@sbarrow-desktop> <48122C14.7070705@omegavortex.net> <1209150944.20639.24.camel@sbarrow-desktop> Subject: Re: [PHP-DEV] Return type hinting patch From: quickshiftin@gmail.com ("Nathan Nobbe") ------=_Part_2899_28166711.1209151497069 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Apr 25, 2008 at 1:15 PM, Sam Barrow wrote: > On Fri, 2008-04-25 at 14:08 -0500, Jeremy Privett wrote: > > Sam Barrow wrote: > > > I figured it out, the syntax is now as follows: > > > > > > function a($b, $c) returns d { > > > } > > > > > > I'll post an update soon. > > > > > > > > > > > > > That's certainly a non-intuitive syntax. How about we take a page out of > > the book of other C-style languages before trying to invent something > > else? I agree with Stas, "return" and "returns" are not part of a > > function definition. > > I don't think it's non-intuitive at all, and even so, it's the most > intuitive we have. This ordering makes more sense to me at first glance (in > the order I would think about things; scope, name, arguments, return). im not sure the following has been explicitly proposed, but how about omitting the 'return' keyword and placing the return type hint before the function identifier function int a($b, $c) {} i think that is most congruent with 'typical' of c style languages, no ? -nathan ------=_Part_2899_28166711.1209151497069--