From:             hostit at mail dot ru
Operating system: All
PHP version:      5.3.0alpha3
PHP Bug Type:     Feature/Change Request
Bug description:  Namespace separator

Description:
------------
Hello.

As you might know a fairly large amount of PHP developers think that
backslash (\) is an inappropriate symbol for namespace separator.
[http://blogsearch.google.com/blogsearch?hl=en&q=php%20namespace%20separator&um=1&ie=UTF-8&sa=N&tab=wb]

Two main reasons are:
1. It's ugly. (Indeed.)
2. Confusion with escaping.

As the roar strengthens, it's starting to appear that it might be one of
the nails in the PHP coffin. Just look at the amount of FUD spread  because
of this damned backslash...

For us, the PHP developers, it's very dangerous tendency, because we have
invested a lot of our time (read: money) into PHP software.

Please, please, PLEASE reconsider that. I understand the problems with 
"::", but I think there can be a solution - to throw fatal error when
there's a conflict between static method name and the function in a
namespace. (You can't declare two functions/classes with the same name, can
you? And it is logical and expected behavior.) I'm sure it will make PHP
programmers happy.

As it's still alpha, the change is possible. And the mistake in the design
of the language will remain forever after the release.


THANK YOU!

Reproduce code:
---------------
\This\is::ugly()

Expected result:
----------------
::This::looks::better()

Actual result:
--------------
\This\is::ugly()

-- 
Edit bug report at http://bugs.php.net/?id=46943&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46943&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46943&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46943&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46943&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46943&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46943&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46943&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46943&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46943&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46943&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46943&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46943&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46943&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46943&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46943&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46943&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46943&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46943&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46943&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46943&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46943&r=mysqlcfg

Reply via email to