rfc:namespaced_names_as_token

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:namespaced_names_as_token [2020/07/09 14:01] nikicrfc:namespaced_names_as_token [2020/07/31 12:54] (current) nikic
Line 2: Line 2:
   * Date: 2020-06-15   * Date: 2020-06-15
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Under Discussion+  * Status: Implemented
   * Target Version: PHP 8.0   * Target Version: PHP 8.0
   * Implementation: https://github.com/php/php-src/pull/5827   * Implementation: https://github.com/php/php-src/pull/5827
Line 103: Line 103:
  
 // This would have previously been interpreted as $foo = Foo\call($bar), // This would have previously been interpreted as $foo = Foo\call($bar),
-// now it will result in a parser error.+// now it will result in a parse error.
 $foo = Foo // <- Missing semicolon $foo = Foo // <- Missing semicolon
 \call($bar); \call($bar);
 </PHP> </PHP>
  
-In this interest of consistency, the ''namespace'' declaration will accept any name, including isolated reserved keywords:+In the interest of consistency, the ''namespace'' declaration will accept any name, including isolated reserved keywords:
  
 <PHP> <PHP>
Line 143: Line 143:
 As such, the practical impact is very limited, and any issues are trivial to fix. On the other hand, this change will reduce the backwards-compatibility impact from any future keyword additions. As such, the practical impact is very limited, and any issues are trivial to fix. On the other hand, this change will reduce the backwards-compatibility impact from any future keyword additions.
  
-Additionally tooling based on ''token_get_all()'' will need to be adjusted to handle the new ''T_NAME_*'' tokens.+Additionally tooling based on ''token_get_all()'' will need to be adjusted to handle the new ''T_NAME_*'' tokens. In practice, this will be the main negative impact of this proposal.
  
 ===== Vote ===== ===== Vote =====
  
-Yes/No.+Voting started 2020-07-17 and ends 2020-07-31. A 2/3 majority is required. 
 + 
 +<doodle title="Treat namespaced names as a single token?" auth="nikic" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
 ===== Future Scope ===== ===== Future Scope =====
  
-An earlier version of this RFC also relaxed various reserved keyword restrictions for class, function and constant declarations. Because these have to deal with more perceived ambiguities, I have dropped them from this proposal. Reserved keyword restrictions can always be lifted lateron, while the change in this RFC contains a backwards-compatibility break that is best done in PHP 8.0.+An earlier version of this RFC also relaxed various reserved keyword restrictions for class, function and constant declarations. Because these have to deal with more perceived ambiguities, I have dropped them from this proposal. Reserved keyword restrictions can always be lifted later on, while the change in this RFC contains a backwards-compatibility break that is best done in PHP 8.0.
  
rfc/namespaced_names_as_token.1594303279.txt.gz · Last modified: 2020/07/09 14:01 by nikic