Re: DateTime improvement
| From: | Nikita Nefedov | Date: | Fri, 21 Dec 2012 10:17:08 +0000 |
| Subject: | Re: DateTime improvement | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64409@lists.php.net to get a copy of this message | ||
I don't think it would be ok to move just DateTimeImmutable to the namespace.
There were proposal to move all the php functions and classes in namespaces, so that for example str_replace() could be \Str\replace() and array_map() could be \Array\map() and so on.
On Fri, 21 Dec 2012 12:33:04 +0400, Christian Stoller <stoller@leonex.de> wrote:
What about putting the new DateTimeImmutable (or whatever it will be called) into a PHP namespace? Something like \PHP\Foobar\DateTimeImmutable Is it generally planned to use namespaces for PHP classes? In my opinion it would be nice if the SPL and other classes would be put into such a namespace, too. Are there any plans to do that? Christian Stoller -----Original Message----- From: Peter Cowburn [mailto:petercowburn@gmail.com] Sent: Friday, December 21, 2012 1:14 AM To: Lazare Inepologlou Cc: Larry Garfield; internals@lists.php.net Subject: Re: [PHP-DEV] DateTime improvement On 20 December 2012 20:06, Lazare Inepologlou <linepogl@gmail.com> wrote:Class names aren't particularly subject, too strictly, to English grammar rules. Besides, the coding standards [1] dictate the class name should be prefixed with the 'parent set' (e.g. extension name), which in this case is not "Immutable". [1] https://github.com/php/php-src/blob/master/CODING_STANDARDS#L152Of course, I have no idea if anyone in userspace is usingDateTimeImmutable... Well, it seems unlikely, unless he is Yoda or French. I mean, in English, it is common to put the adjective in front of the noun, isn't it?Lazare INEPOLOGLOU Ingénieur Logiciel