rfc:closures_in_const_expr
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:closures_in_const_expr [2024/10/30 07:53] – Remove 'static variable initializers', supported with rfc:arbitrary_static_variable_initializers timwolla | rfc:closures_in_const_expr [2024/11/13 13:35] (current) – Voting timwolla | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2024-10-24 | * Date: 2024-10-24 | ||
* Author: Tim Düsterhus (tim@tideways-gmbh.com), | * Author: Tim Düsterhus (tim@tideways-gmbh.com), | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
Line 52: | Line 52: | ||
If Closures are placed in constant expressions they are subject to the following constraints: | If Closures are placed in constant expressions they are subject to the following constraints: | ||
- | * They may not include variables from the surrounding scope using < | + | * They may not include variables from the surrounding scope using < |
- | * They must be < | + | * They must be < |
Both of these constraints will be verified at compile time. | Both of these constraints will be verified at compile time. | ||
Line 92: | Line 92: | ||
</ | </ | ||
- | Passing a Closure to a new expression: | + | Passing a Closure to a <php>new</ |
<PHP> | <PHP> | ||
Line 198: | Line 198: | ||
* Support non-static Closures. | * Support non-static Closures. | ||
* Support first-class callables. | * Support first-class callables. | ||
+ | * Support variable capturing if/when variables may appear in constant expressions. | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | <doodle title=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No |
rfc/closures_in_const_expr.1730274816.txt.gz · Last modified: 2024/10/30 07:53 by timwolla