Req #73347 [Opn->Sus]: Proporse new namespace separator: dot inside a string
| From: | cmb@php.net | Date: | Tue, 25 Oct 2016 15:26:16 +0000 |
| Subject: | Req #73347 [Opn->Sus]: Proporse new namespace separator: dot inside a string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205002@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73347&edit=1
ID: 73347
Updated by: cmb@php.net
Reported by: fede dot carg at gmail dot com
Summary: Proporse new namespace separator: dot inside a
string
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Class/Object related
PHP Version: 7.1.0RC3
Block user comment: N
Private report: N
New Comment:
In my opion, it wouldn't make sense to introduce this syntax only
for namespace and use statements, but not for the general case.
The latter, however, would introduce several issues, e.g. that
someone might want to construct a qualified identifier dynamically
what would raise performance issues, if possible at all.
Anyhow, such a change would require an RFC[1]; therefore I'm
suspending this feature request.
[1] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2016-10-19 10:48:41] fede dot carg at gmail dot com
Description:
------------
The backslash namespace separator was introduced in 2008 http://news.php.net/php.internals/41374
Would it be possible to consider using dots inside strings. Eg:
```
namespace "my.package";
use "some.package.class";
```
How difficult would it be for the interpreter to parse this line of code? For me, it the most modern
and clean solution. And it looks much better, doesn't it?
Expected result:
----------------
```
namespace "my.package";
use "some.package.class";
```
Actual result:
--------------
```
namespace my\package;
use some\package\class;
```
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73347&edit=1