Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Namespaces: Technical proposal [RSS Feed]

#1 Nov. 28, 2005 21:55:02

David Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Namespaces: Technical proposal


Cool. If that won't work, I'd rather have ::: over \, please ;)

- David


Am 28.11.2005 um 22:52 schrieb Oliver Grätz:Hi folks!I had some PM discussions about the (presumably premature) death of":"as the namespace symbol.Most people liked this, some liked "::" (which will definetely NOTwork)and then the opinion was very split with a lot of people saying"OK, ifit has to be" to ":::". Some folks even resigned and went for thewidelyhated "\". I'll recompile a table later this night with correctedopinions (don't worry, I have redflagged all vote posts in myThunderbird).But now there might be a possibility to go with ":". Jessie will testthis out and I suppose he'll come out with results (hopefullypositive).Here's the idea: When the tokenizer encounters the opening "?" of the
ternary, it DEACTIVATES the namespace operator until the end of the
ternary. This way, all old code will behave as before, nothing will be
broken. Of course, this absolutely requires the use of parentheses ifone absolutely needs to use namespaces inside the ternary. As suchcaseswill be pretty rare, this is no big drawback. The good thing: no
whitespace magic is needed!

Comments?

OLLi

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

Offline

#2 Nov. 28, 2005 22:32:50

Oliver G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Namespaces: Technical proposal


Hi folks!

I had some PM discussions about the (presumably premature) death of ":"
as the namespace symbol.

Most people liked this, some liked "::" (which will definetely NOT work)
and then the opinion was very split with a lot of people saying "OK, if
it has to be" to ":::". Some folks even resigned and went for the widely
hated "\". I'll recompile a table later this night with corrected
opinions (don't worry, I have redflagged all vote posts in my Thunderbird).

But now there might be a possibility to go with ":". Jessie will test
this out and I suppose he'll come out with results (hopefully positive).

Here's the idea: When the tokenizer encounters the opening "?" of the
ternary, it DEACTIVATES the namespace operator until the end of the
ternary. This way, all old code will behave as before, nothing will be
broken. Of course, this absolutely requires the use of parentheses if
one absolutely needs to use namespaces inside the ternary. As such cases
will be pretty rare, this is no big drawback. The good thing: no
whitespace magic is needed!

Comments?

OLLi

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

Offline

#3 Nov. 29, 2005 08:06:05

Hartmut H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Namespaces: Technical proposal


Oliver Grätz wrote:Here's the idea: When the tokenizer encounters the opening "?" of the
ternary, it DEACTIVATES the namespace operator until the end of the
ternary. This way, all old code will behave as before, nothing will be
broken. Of course, this absolutely requires the use of parentheses if
one absolutely needs to use namespaces inside the ternary. As such cases
will be pretty rare, this is no big drawback. The good thing: no
whitespace magic is needed!this adds almost the same WTF? factor as requring whitespace,
and being a pretty rare case only adds to this ...

(not to mention that maintaining a parser with special state
rules like this becomes a WTF? PITA anyway ...)

--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com

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

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Namespaces: Technical proposal [RSS Feed]

Board footer

Moderator control

Enjoy the 23rd of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support