rfc:match_expression

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
Next revisionBoth sides next revision
rfc:match_expression [2020/04/24 20:24] – Add more block examples ilijatovilorfc:match_expression [2020/04/25 09:46] – Rename prefix op to unary ilijatovilo
Line 212: Line 212:
 </code> </code>
  
-For the time being using blocks in match expressions that use the return value in any way result in a compilation error:+For the time being using blocks in match expressions that use the return value in any way results in a compilation error:
  
 <code php> <code php>
Line 261: Line 261:
 </code> </code>
  
-This introduces an ambiguity with the ''+'' and ''-'' prefix operators.+This introduces an ambiguity with the ''+'' and ''-'' unary operators.
  
 <code php> <code php>
Line 277: Line 277:
 </code> </code>
  
-When ''match'' appears as the first element of a statement would always be parsed as option 1 because there are no legitimate use cases for binary operations at a statement level. All other cases work as expected.+''match'' that appears as the first element of a statement would always be parsed as option 1 because there are no legitimate use cases for binary operations at a statement level. All other cases work as expected.
  
 <code php> <code php>
Line 544: Line 544:
 ==== If you voted no, why? ==== ==== If you voted no, why? ====
  
-  1. Not interested +  Not interested 
-  2. I don't want blocks +  I don't want blocks 
-  3. Missing return values in blocks +  Missing return values in blocks 
-  4. Missing pattern matching +  Missing pattern matching 
-  5. Missing explicit fallthrough +  Missing explicit fallthrough 
-  6. BC break is not acceptable +  BC break is not acceptable 
-  7. Other+  - Wanted [[https://wiki.php.net/rfc/switch_expression|switch expressions]] instead 
 +  - Other
  
 <doodle title="If you voted no, why?" auth="ilijatovilo" voteType="multi" closed="true"> <doodle title="If you voted no, why?" auth="ilijatovilo" voteType="multi" closed="true">
Line 560: Line 561:
    * 6    * 6
    * 7    * 7
 +   * 8
 </doodle> </doodle>
  
rfc/match_expression.txt · Last modified: 2020/05/09 15:59 by ilijatovilo