Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88797 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43184 invoked from network); 14 Oct 2015 22:50:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2015 22:50:45 -0000 Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:35913] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/46-33697-54CDE165 for ; Wed, 14 Oct 2015 18:50:45 -0400 Received: by wicgb1 with SMTP id gb1so249457406wic.1 for ; Wed, 14 Oct 2015 15:50:41 -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=nV/PtpU8PtGSQD6VrbjtJ/f6LsNgdRJWIBCOzHzRXpE=; b=LTHC8j7UgweHh8ett67ugqhIjiteqqtpd0VutojxYp8qSF211gqzAUsCSZ85IuOULa 3wSPwgOSaAqGpVkLQ3W21DJH7mr4k20Pq0VSrQqEemmKs2/D9ZROFs3Halc6XaGT62TS l7AZWs6OA05vWqeCLNfzkjhnPrYFIS2AZmgWsxD1OdhEYGxUGQxQjyZNXlroD9mLqzuS 5RoTr7OXHnmmuAElJZ+K4FaUC/QNcZ3iN+rJtQz1QrUaqpRsoJSnPeMY24HM2V4nVWd/ 6ekrIil7Ch/muA3h1+SBPAhC+GqQvQvidk4GeuFFCq5Lfuq4jMOFIwNqARa6FhpyZdSc 2zcw== MIME-Version: 1.0 X-Received: by 10.180.106.10 with SMTP id gq10mr6589963wib.51.1444863041751; Wed, 14 Oct 2015 15:50:41 -0700 (PDT) Received: by 10.28.143.137 with HTTP; Wed, 14 Oct 2015 15:50:41 -0700 (PDT) In-Reply-To: References: <0A.C2.33697.6AECE165@pb1.pair.com> <561ED07E.4060809@gmail.com> Date: Wed, 14 Oct 2015 16:50:41 -0600 Message-ID: To: Levi Morrison Cc: Stanislav Malyshev , Andrea Faulds , internals Content-Type: multipart/alternative; boundary=f46d0444806f5a4f0d052218642a Subject: =?UTF-8?B?UmU6IFtQSFAtREVWXSBbUkZDXSBWb2lkIFJldHVybiBUeXBlICh2MC4yLCByZcO2cGVuaQ==?= =?UTF-8?B?bmcp?= From: derokorian@gmail.com (Ryan Pallas) --f46d0444806f5a4f0d052218642a Content-Type: text/plain; charset=UTF-8 On Wed, Oct 14, 2015 at 4:46 PM, Levi Morrison wrote: > > > I agree that `void` doesn't make sense given that we document that > `return;` will return null[1]. If the union types RFC[2] passes it > makes sense to allow `Foo | null` which allows something of type `Foo` > or `null`. To me it makes sense that if you then remove `Foo` you are > left with `null`, not `void`. My personal recommendation because of > this would be to use `null` for the return type and instead of `void`. > > Also, I do not think this feature is pointless. For instance, it has > value in interfaces. Declaring that a method does not return a value > means implementors cannot accidentally return something. This is > better than just documenting that it should not be done. +1 these are my thoughts exactly. I would be for it if it was null, and interfaces is exactly why I would be for it. --f46d0444806f5a4f0d052218642a--