Re: [RFC] Nullable Types

From: Date: Thu, 14 Apr 2016 09:00:32 +0000
Subject: Re: [RFC] Nullable Types
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-92281@lists.php.net to get a copy of this message
On Wed, 13 Apr 2016, Levi Morrison wrote: > As alluded to in an earlier email today[1] I am now moving the > Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC > proposes syntax for declaring a type to alternatively be null. > > There is a decision that needs to be made: does the question mark go > before or after the type name? > > function (?Foo $foo); > function (Foo? $foo); > > There are precedents in several languages for each position. Some > relevant issues to where the question mark goes are noted in the > RFC[3]. Please put it where HHVM puts it: in front of it. Other languages are less of an issue than a syntax that's already used in a somewhat PHP language. As to the rest of the RFC: LGTM! cheers, Derick

« previous php.internals (#92281) next »