rfc:match_expression
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:match_expression [2020/04/25 08:09] – Add switch expression to failed reason ilijatovilo | rfc:match_expression [2020/05/09 15:59] (current) – Move to declined ilijatovilo | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2020-04-12 | * Date: 2020-04-12 | ||
* Author: Ilija Tovilo, tovilo.ilija@gmail.com | * Author: Ilija Tovilo, tovilo.ilija@gmail.com | ||
- | * Status: | + | * Status: |
* Target Version: PHP 8.0 | * Target Version: PHP 8.0 | ||
* Implementation: | * Implementation: | ||
Line 261: | Line 261: | ||
</ | </ | ||
- | This introduces an ambiguity with the '' | + | This introduces an ambiguity with the '' |
<code php> | <code php> | ||
Line 323: | Line 323: | ||
</ | </ | ||
- | The keyword '' | + | The keyword '' |
+ | |||
+ | <code php> | ||
+ | match { | ||
+ | preg_match(...) => {}, // preg_match returns 1 which is NOT identical (===) to true | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Because I have no strong opinion on this it will be moved to a secondary vote. | ||
===== Miscellaneous ===== | ===== Miscellaneous ===== | ||
==== Arbitrary expressions ==== | ==== Arbitrary expressions ==== | ||
- | A match condition can be any arbitrary expression. Analogous to '' | + | A match condition can be any arbitrary expression. Analogous to '' |
<code php> | <code php> | ||
Line 429: | Line 437: | ||
// Algebraic data types if we ever get them | // Algebraic data types if we ever get them | ||
- | let Ast\BinaryExpr($lhs, | + | let Ast::BinaryExpr($lhs, |
} | } | ||
Line 521: | Line 529: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
+ | Voting starts 2020-04-25 and ends 2020-05-09. | ||
+ | |||
As this is a language change, a 2/3 majority is required. | As this is a language change, a 2/3 majority is required. | ||
Line 544: | Line 554: | ||
==== If you voted no, why? ==== | ==== If you voted no, why? ==== | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
<doodle title=" | <doodle title=" |
rfc/match_expression.txt · Last modified: 2020/05/09 15:59 by ilijatovilo