Namespaces for PHP6, the internals discussions

Written by on November 29, 2005 in General - 4 Comments

Christian Stocker pointed today to discussions that have been taken in the PHP internals group : PHP is (most presumably) getting namespaces. Namespaces is one of the great features that developers are awaiting in the Next generation of PHP.

The annoying part of the discussion (with dozens of redundant posts) was about which namespace separator should be used. The proposals went from ~> to }{ to :> and other funny combinations and someone even started counting the votes and making a big table of his interpretation what the people said… You have to keep in mind, that there are usually no votes on internals, but conclusions are tried to be made by consensus.

Namespaces is maybe making a buzz in the mailing list, even if the people flooding the discussion are not the one concerned by taken the decision on this choice. Personaly Namespaces won’t add many thing for me, but it still great feature to have in the next PHP.

Anyway, at the end it boils down to either :: or ::: or as separator, the double colons have some technical limitations, the backslash looks somehow strange, but I think, one could get used to it. How this would look like (nested namespaces are possible):


name1:::name2:::class::func();
name1name2class::func();

We are already talking about Namespaces for the next generation of PHP, we have already talked before about the unicode support with the document proposal of Andrei Zmievski. While PHP4 still the most used version of PHP, the php community keep brainstorming about the future of this great scripting language which made a revolution in the last decade.

Currently the Ruby community is making also great marketing effort to promote ruby on rails, And they are really making good job. Which I could see the php community work again in the same way it was working before to make more great feature for the enterprise level and profit from a 10 years old experience in web scripting language.

4 Comments on "Namespaces for PHP6, the internals discussions"

  1. Super Mike December 1, 2006 at 5:47 pm · Reply

    Thanks for posting this. It was very informative.
    Here’s another link you might find useful:
    http://reddit.com/info/t92l/comments/ct930

  2. Jafar Rahmati January 29, 2008 at 7:36 am · Reply

    Seems great!
    But why wait until PHP 6 if you can use a trick?
    Check php.jafarsoft.com for more info!

  3. Jafar Rahmati January 29, 2008 at 7:42 am · Reply

    Seems great!
    But why wait until PHP 6 if you can use a trick?
    Check php.jafarsoft.com for more info!

  4. Jafar Rahmati January 29, 2008 at 7:44 am · Reply

    Seems great!
    But why wait until PHP 6 if you can use a trick?
    Check php.jafarsoft.com for more info!

Leave a Comment