Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42345 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98798 invoked from network); 19 Dec 2008 13:38:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2008 13:38:40 -0000 Authentication-Results: pb1.pair.com header.from=surreal.w00t@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=surreal.w00t@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: surreal.w00t@gmail.com X-Host-Fingerprint: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:30550] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/E1-09584-FD3AB494 for ; Fri, 19 Dec 2008 08:38:39 -0500 Received: by fg-out-1718.google.com with SMTP id 16so367811fgg.23 for ; Fri, 19 Dec 2008 05:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=pos+G4L2RUJQXYNpV9Kn6Hh4ftoTGtqb2uF/on3csz8=; b=Uk48BagPbyZhQVgWbL5U/utykK4zPZ4mvR3dZ3qmfDwEbpZCCOQh39+9/zGiuMuqv0 jez+0tYXalAj4D4iUeznu3NeLXG3QFXZODv8ktgY5LvjylRc3/dTFhGsyWarWu3hu4+B nKuIExRr3ge7eBWNAmDIV2G5tIGx3ie2nAONw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=R0JaOKoBp5pt3vmRuBjRbo5p95RnUK17ZsMezfHo+lIHvOloNTzVT8hiExlIgQvdyP Xz+ROO4in7rigYEjGR1UB+Im5bcRwokVHJvIUyv4zKVOJF7yjBsX6ALxwB9K2lt4j7aU ImVHzz8BRq5N+0oGKAUf060j7WN1EiQLIySR8= Received: by 10.86.60.14 with SMTP id i14mr1818669fga.70.1229693916525; Fri, 19 Dec 2008 05:38:36 -0800 (PST) Received: by 10.86.87.15 with HTTP; Fri, 19 Dec 2008 05:38:36 -0800 (PST) Message-ID: Date: Fri, 19 Dec 2008 13:38:36 +0000 Reply-To: viroteck@viroteck.net Sender: surreal.w00t@gmail.com To: "Kalle Sommer Nielsen" Cc: "Nathan Rixham" , "Dave Ingram" , "=?ISO-8859-1?Q?Cristian_Rodr=EDguez?=" , internals@lists.php.net In-Reply-To: <2dedb8a0812181823q53a3b464oc1e2e2bd37792f98@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <69.22.48223.7E389494@pb1.pair.com> <494A3B12.80509@dmi.me.uk> <494ABFD8.2090406@suse.de> <494ACAA8.6080600@dmi.me.uk> <494ACEAE.2090700@gmail.com> <494AD2AF.9000702@gmail.com> <2dedb8a0812181823q53a3b464oc1e2e2bd37792f98@mail.gmail.com> X-Google-Sender-Auth: 7733e5003eb7e477 Subject: Re: [PHP-DEV] Q on Primitives From: viroteck@viroteck.net ("Robin Burchell") Just a random thought I have from reading over that: Would it not be more 'natural' to change 'function' to indicate a method with a variant return type, and allow e.g. 'int somefunc()' instead of 'function (int) somefunc()' to indicate an int return? It would be a bit more in fitting with traditional languages, and definitely less typing.. it may require some parser modification, though..? (I'd also like to throw my +1 in for scalar type hints, and optional type coercion for return values - this is something I have run into annoyances with and blogged about in the past) Thanks, Robin Burchell On Fri, Dec 19, 2008 at 2:23 AM, Kalle Sommer Nielsen wrote: > 2008/12/18 Nathan Rixham : >> Nathan Rixham wrote: >> >> and strongly typed returns.. nearly forgot >> >> public static function parseByte( Number $var ):bool { >> or >> public static function bool parseByte( Number $var ) { >> >> or such like >> > > Theres already an RFC for this: > http://wiki.php.net/rfc/typehint > > > > > -- > Kalle Sommer Nielsen > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >