rfc:poll_switch_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
rfc:poll_switch_expression [2020/03/31 18:30] – Add none as an option ilijatovilorfc:poll_switch_expression [2020/04/11 23:50] (current) – close vote ilijatovilo
Line 30: Line 30:
 // * Each case can only contain a single expression // * Each case can only contain a single expression
 // * Type coercion remains // * Type coercion remains
-$y = $x switch {+$y = switch ($x{
     1, 2, 3 => {{expression}},     1, 2, 3 => {{expression}},
 }; };
Line 65: Line 65:
 ===== Poll ===== ===== Poll =====
  
-<doodle title="I prefer the approach" auth="ilijatovilo" voteType="single" closed="false">+<doodle title="I prefer the approach" auth="ilijatovilo" voteType="single" closed="true">
    * switch expression    * switch expression
    * switch replacement    * switch replacement
rfc/poll_switch_expression.1585679430.txt.gz · Last modified: 2020/03/31 18:30 by ilijatovilo