rfc:compact-object-property-assignment
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:compact-object-property-assignment [2020/03/28 21:32] – jgivoni | rfc:compact-object-property-assignment [2020/03/31 02:47] – danack | ||
---|---|---|---|
Line 6: | Line 6: | ||
* Date: 2020-03-17 | * Date: 2020-03-17 | ||
* Author: Jakob Givoni < | * Author: Jakob Givoni < | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
Line 18: | Line 18: | ||
As an alternative to writing a data structure as an associative array, COPA gives the data a **// | As an alternative to writing a data structure as an associative array, COPA gives the data a **// | ||
- | > COPA does not introduce any new concepts or complexities, | + | > COPA does not introduce any new concepts or complexities, |
==== Example ==== | ==== Example ==== | ||
Line 422: | Line 422: | ||
); | ); | ||
</ | </ | ||
+ | === Syntax F === | ||
+ | |||
+ | **WITH** syntax | ||
+ | |||
+ | <code php> | ||
+ | myObj.with { | ||
+ | foo = 10 | ||
+ | bar = foo + 20 | ||
+ | } | ||
+ | </ | ||
+ | If this is the preferred syntax it will require a new RFC. | ||
+ | |||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
Line 452: | Line 464: | ||
> **Note!** Chaining method calls is not an atomic operation either. The cost/ | > **Note!** Chaining method calls is not an atomic operation either. The cost/ | ||
- | ===== Proposed Voting Choices | + | ===== Vote ===== |
+ | |||
+ | Voting starts 2020-03-31 and ends 2020-04-13. | ||
The primary vote of whether or not to accept this RFC requires a 2/3 majority. | The primary vote of whether or not to accept this RFC requires a 2/3 majority. | ||
- | A secondary “vote” directed at no-voters, will ask you the primary reason for voting “No”. | + | <doodle title=" |
- | + | * Yes | |
- | The options will be: | + | * No |
- | + | </ | |
- | - I voted yes! | + | |
- | - I don’t find the feature useful | + | |
- | - I don’t | + | |
- | - I prefer a more comprehensive solution | + | |
- | - I prefer a narrower solution to this problem | + | |
- | - This breaks backwards compatibility | + | |
- | - This will negatively limit future changes | + | |
- | - This will be a nightmare to implement and maintain | + | |
- | - I prefer not to say | + | |
- | This will help understand | + | <doodle title=" |
+ | * I voted yes! | ||
+ | * I don’t find the feature useful | ||
+ | * I don’t like the syntax | ||
+ | * I prefer a more comprehensive solution to this problem | ||
+ | * I prefer a narrower solution to this problem | ||
+ | * This breaks backwards compatibility | ||
+ | * This will have negative implications for future | ||
+ | * This will be a nightmare | ||
+ | * I prefer not to say | ||
+ | </ | ||
- | There could be a 3rd vote on alternative | + | <doodle title=" |
+ | * A (the proposed one) | ||
+ | * B | ||
+ | * C | ||
+ | * D | ||
+ | * E | ||
+ | * F | ||
+ | * Irrelevant | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/compact-object-property-assignment.txt · Last modified: 2020/04/14 06:30 by jgivoni