RE: [PHP-DEV] DateTime improvement

From: Date: Fri, 21 Dec 2012 08:33:04 +0000
Subject: RE: [PHP-DEV] DateTime improvement
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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:[email protected]] 
Sent: Friday, December 21, 2012 1:14 AM
To: Lazare Inepologlou
Cc: Larry Garfield; [email protected]
Subject: Re: [PHP-DEV] DateTime improvement

On 20 December 2012 20:06, Lazare Inepologlou <[email protected]> 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





Thread (34 messages)

« previous php.internals (#64400) next »