Re: Soft-reserve "void" class name

From: Date: Thu, 21 May 2015 11:31:09 +0000
Subject: Re: Soft-reserve "void" class name
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-86341@lists.php.net to get a copy of this message
Hi, > De: "Nikita Popov" <nikita.ppv@gmail.com> > > For PHP 7 we soft-reserved a number of class names [1] like "numeric", so > that we have the ability to introduce them as typehints in a 7.x release. > "Soft" here means that we only document these names as being reserved and > don't throw an error when they're used. > > I'd like to add "void" to this list, so we have the option to introduce a > void return type in PHP 7.x. I've seen some disagreement as to whether this > should be called "void" or "null" - this discussion should be held when an > RFC comes up, however we need to keep both options open until then. > (Currently only "null" is reserved.) May I repeat my arguments to have this reservations enforced by a warning message ? 'Soft' reservation is easier but it is not enough. If we give a special meaning to one of these names in a 7.x release, we will introduce a BC break, whatever the documentation states, because that's the definition of a BC break : software that works fine in 7.0 and does not work the same in 7.x. Do we want to guarantee BC on minor versions ? If we don't enforce a check on reserved class names, IMO, we can't. Once again, this is a short-term half-baked solution we'll pay later. PS: If you're OK, I am ready to implement the check. Regards François

« previous php.internals (#86341) next »