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 <stol...@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:petercowb...@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 <linep...@gmail.com> wrote:
Of course, I have no idea if anyone in userspace is using
DateTimeImmutable...

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?

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#L152


Lazare INEPOLOGLOU
Ingénieur Logiciel



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to