rfc:alternative-closure-use-syntax

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:alternative-closure-use-syntax [2019/06/15 21:48]
wesnetmo
rfc:alternative-closure-use-syntax [2019/06/16 12:03]
wesnetmo
Line 10: Line 10:
  
 PHP users often say that they find defining the lexical-scope imports cumbersome, because PHP users often say that they find defining the lexical-scope imports cumbersome, because
-they hate writing ​the variables explicitly.+they hate importing ​the variables explicitly.
  
-My (updated) ​opinion on the matter is that what's actually annoying is not having to write +My opinion on the matter is that what's actually annoying is not writing ​the variable 
-the variable names, but the syntax with which the imports are defined.+names, but the syntax with which the imports are defined.
  
-In ES we are forced ​to declare variables ​and we don't find it annoying; in PHP we don't+In ES we are required ​to declare variables ​but we don't find it annoying; in PHP we don't
 have to declare variables, but we are required to specify which one we want to import in have to declare variables, but we are required to specify which one we want to import in
 ''​Closure''​s. It won't be much different if not for the syntax. It is very standard in ES, ''​Closure''​s. It won't be much different if not for the syntax. It is very standard in ES,
Line 110: Line 110:
         echo 123;         echo 123;
         use $importVariable3,​ &​$importVariable4;​         use $importVariable3,​ &​$importVariable4;​
-        // ^ syntax error, as use can only be preceded by other use statements+        // ^ syntax error, as "use" ​can only be preceded by other "use" ​statements
     };     };
 </​PHP>​ </​PHP>​
Line 130: Line 130:
  
 Vote will require 2/3 majority Vote will require 2/3 majority
- 
-===== References ===== 
- 
-  * abc 
-  * def 
- 
rfc/alternative-closure-use-syntax.txt · Last modified: 2019/06/16 12:03 by wesnetmo