On Mon, Jan 20, 2020 at 2:58 PM Benjamin Morel <benjamin.mo...@gmail.com> wrote:
> Hi Internals, > > A year ago, when WeakRef was being proposed, some objections > <https://externals.io/message/104014#104068> related to the PECL Weakref > package <https://www.php.net/manual/fr/book.weakref.php> had lead the RFC > author, Joe Watkins, to rename WeakRef to WeakReference to avoid conflicts. > > However, the latest addition from Nikita Popov, WeakMap > <https://wiki.php.net/rfc/weak_maps>, did not take the same argument into > account, therefore conflicting with PECL WeakMap > <https://www.php.net/manual/fr/class.weakmap.php>. > > *First of all, how will this be handled in the docs?* > > Now that we have a conflict on WeakMap anyway, and now that the PECL > package has been deprecated, and provided that the conflict can be > gracefully handled in the docs, *is there anything that prevents > WeakReference from being called WeakRef?* > > Could we have both names in PHP 8, like WeakReference being an alias for > WeakRef? > I don't see a point in renaming the class now that the WeakReference name has been chosen. I don't agree with the reasons *why* it was picked, but it's not like "WeakReference" is a bad name in itself. That's what Java calls it as well, for example. Regards, Nikita