Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57055 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16416 invoked from network); 23 Dec 2011 01:58:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2011 01:58:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=will.fitch@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=will.fitch@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: will.fitch@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:52839] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/34-28504-C50E3FE4 for ; Thu, 22 Dec 2011 20:58:52 -0500 Received: by qabj40 with SMTP id j40so5058408qab.8 for ; Thu, 22 Dec 2011 17:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=vU629u+ySbvMRmvnLAOUwwmlSoK299DLyKT+J6bUBNo=; b=snuKhC7zQXrq4fopVmDRXhxyvvKb03iClCnSitnK0Rl7gqOhKaj+nLeQRmaFA3CQ7u J6yMquzP36a7Sip+C29ajdmj7RdwLFCz7NioPZWIZRLoutRh1cF5nXiX9Ff/bIfA9CGB MDzkGlJujmKbVMgMDRuGOntRw7Dfrk9bu6iQc= Received: by 10.224.31.148 with SMTP id y20mr16369207qac.80.1324605529630; Thu, 22 Dec 2011 17:58:49 -0800 (PST) Received: from [10.0.0.10] (c-71-225-170-108.hsd1.pa.comcast.net. [71.225.170.108]) by mx.google.com with ESMTPS id hv20sm20872138qab.22.2011.12.22.17.58.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Dec 2011 17:58:48 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4EF3D18B.7040900@sugarcrm.com> Date: Thu, 22 Dec 2011 20:58:46 -0500 Cc: =?iso-8859-1?Q?=C1ngel_Gonz=E1lez?= Content-Transfer-Encoding: quoted-printable Message-ID: <11CFB4E4-F2DA-4766-AA23-D08180C3910B@gmail.com> References: <2095305E-D4E3-4D7E-8218-32EE99688E0C@GMAIL.COM> <2C90FB94-38C4-4270-8C6A-B89304BA8ED8@gmail.com> <159A7CA2-8561-40DA-9434-CAAE12304DDB@gmail.com> <4EF3B56A.4040809@gmail.com> <-2451498990672032588@unknownmsgid> <4EF3BD21.2040301@sugarcrm.com> <-6952580475866195972@unknownmsgid> <4EF3C7F7.9010404@sugarcrm.com> <4841689055873111589@unknownmsgid> <4EF3D18B.7040900@sugarcrm.com> To: Stas Malyshev , PHP Developers Mailing List X-Mailer: Apple Mail (2.1251.1) Subject: Re: [PHP-DEV] Return Type Hinting for Methods RFC From: will.fitch@gmail.com (Will Fitch) I would like to take this opportunity to query on a consensus: Would you prefer to allow methods with type hinted return values to = return null at will, or add a marker noting that it *may* return null? Example: Return null at will public ArrayIterator getIterator() { // something happened, will return null return null; } Example: Return only if identified as such public ArrayIterator? getIterator() { return null; }