Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62305 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74882 invoked from network); 20 Aug 2012 19:15:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2012 19:15:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.134 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.134 oxmail.registrar-servers.com Received: from [64.22.89.134] ([64.22.89.134:55966] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/35-07742-BCC82305 for ; Mon, 20 Aug 2012 15:15:23 -0400 Received: from [192.168.0.200] (5ad3285b.bb.sky.com [90.211.40.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id DD0E5F002B; Mon, 20 Aug 2012 15:15:18 -0400 (EDT) Message-ID: <50328CAB.8040503@ajf.me> Date: Mon, 20 Aug 2012 20:14:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Stas Malyshev CC: Nikita Popov , =?ISO-8859-1?Q?=C1ngel_Gonz=E1?= =?ISO-8859-1?Q?lez?= , Rasmus Lerdorf , Derick Rethans , PHP internals References: <503171CB.3090609@sugarcrm.com> <50317E51.4090305@lerdorf.com> <503225D8.4040900@gmail.com> <503285F6.60704@sugarcrm.com> In-Reply-To: <503285F6.60704@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Generators From: ajf@ajf.me (Andrew Faulds) On 20/08/12 19:46, Stas Malyshev wrote: > Hi! > >> What would *actually* make sense here are return value typehints. E.g. >> one could have something like `public Iterator getIterator() { ... }`. > And again we're back to inventing syntax to do what documentation should > be doing. > For the large part, but consider type hints mean that if you return a completely wrong type, you can warn the programmer. -- Andrew Faulds http://ajf.me/