Re: Namespaces in Core

From: Date: Tue, 07 Feb 2017 10:29:36 +0000
Subject: Re: Namespaces in Core
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-98237@lists.php.net to get a copy of this message
"Stanislav Malyshev" wrote in message news:a8d24d41-bd3a-0881-3fcb-9366fe974c28@gmail.com...
Hi!
New classes within 7.2 (e.g. \HashContext) to be moved without concern for BC (e.g. \php\Hash\HashContext) Older classes (e.g. \RecursiveIteratorIterator) to be moved AND ALIASED FOR BC (e.g. \php\SPL\Iterator\RecursiveIteratorIterator)
Do we really need this? I mean, it's not very likely that there's another RecursiveIteratorIterator in PHP code, and in user code it'd be namespaced anyway... It just looks like a lot of moving things around without any visible (at least visible to me) benefit. And given that no code would be able to use the long name for like 10 years, and even then why would anybody use long name if short one works.... In general, I don't see a point. New exts/features - sure.
I agree with Stanislav. Everyone should remember that namespaces were only invented to deal with a particular problem - that of name collisions with user-land code or third-party libraries. It was NEVER intended to be applied to all core functions. Do you realise that this will break ALL existing code? For what benefit? Just to satisfy someone's personal preference is NOT enough justification. -- Tony Marston

« previous php.internals (#98237) next »