rfc:calls_in_constant_expressions_poll
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:calls_in_constant_expressions_poll [2020/02/17 01:46] – tandre | rfc:calls_in_constant_expressions_poll [2020/02/17 03:26] – tandre | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Poll: Places to allow function calls in constant expressions ====== | ====== Poll: Places to allow function calls in constant expressions ====== | ||
- | * Version: 0.1 | + | * Version: 0.2 |
* Date: 2020-02-16 | * Date: 2020-02-16 | ||
* Author: Tyson Andre, tandre@php.net | * Author: Tyson Andre, tandre@php.net | ||
Line 16: | Line 16: | ||
- Static variable default values. | - Static variable default values. | ||
- | This poll was created to gather opinions on which of the above statement types would be desirable to change, and in which ways. | + | This poll was created to gather opinions on which of the above statement types would be desirable to change, and in which ways, to shape subsequent RFCs. It seems desirable to change some of these expression types (e.g. parameter defaults, static properties) in different ways from others. |
===== Proposal ===== | ===== Proposal ===== | ||
Line 23: | Line 23: | ||
It was later changed to support only a whitelist of function calls. | It was later changed to support only a whitelist of function calls. | ||
- | Because of the following list of reasons, that RFC is being put on hold to gather feedback before | + | Because of the following list of reasons, that RFC is being put on hold to gather feedback before |
- | * That RFC would affect those 5 use cases the same way. Although the check for constant expressions is currently the same for those 5 use cases, there' | + | * That RFC would affect those 5 use cases the same way. Although the restriction to constant expressions is currently the same for those 5 use cases, there' |
* It would be useful to allow any function calls (even those returning objects or references) in parameter defaults and static property defaults (e.g. methods, functions returning objects, .). (Parameter defaults containing function calls would behave as if they were evaluated every time the function was called without that parameter) | * It would be useful to allow any function calls (even those returning objects or references) in parameter defaults and static property defaults (e.g. methods, functions returning objects, .). (Parameter defaults containing function calls would behave as if they were evaluated every time the function was called without that parameter) | ||
* Preferring to make a choice on whether or not the RFC uses a whitelist before the vote is started. | * Preferring to make a choice on whether or not the RFC uses a whitelist before the vote is started. | ||
Line 91: | Line 91: | ||
===== References ===== | ===== References ===== | ||
https:// | https:// | ||
+ | |||
+ | https:// | ||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
Changing the behavior of instance properties was rejected. If functions were only invoked once, then '' | Changing the behavior of instance properties was rejected. If functions were only invoked once, then '' |
rfc/calls_in_constant_expressions_poll.txt · Last modified: 2020/03/04 13:53 by tandre