rfc:compact-object-property-assignment

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:compact-object-property-assignment [2020/03/24 03:22] jgivonirfc:compact-object-property-assignment [2020/04/14 06:30] (current) jgivoni
Line 6: Line 6:
   * Date: 2020-03-17   * Date: 2020-03-17
   * Author: Jakob Givoni <jakob@givoni.dk>   * Author: Jakob Givoni <jakob@givoni.dk>
-  * Status: Under [[https://externals.io/message/109055|Discussion]]+  * Status: Declined 
 +  * Discussion: [[https://externals.io/message/109055]]
  
 ===== Introduction ===== ===== Introduction =====
Line 153: Line 154:
 <code php> <code php>
 (new Foo)->[ (new Foo)->[
-    om ='get',+    om = 'get',
     mane = 'a',     mane = 'a',
     hum = (new Foo)->[     hum = (new Foo)->[
Line 422: Line 423:
 ); );
 </code> </code>
 +=== Syntax F ===
 +
 +**WITH** syntax
 +
 +<code php>
 +myObj.with {
 +     foo = 10
 +     bar = foo + 20
 +}
 +</code>
 +If this is the preferred syntax it will require a new RFC.
 +
 ===== Rejected Features ===== ===== Rejected Features =====
  
Line 452: Line 465:
 > **Note!** Chaining method calls is not an atomic operation either. The cost/benefit of implementing “transaction” and “rollback” behavior is negative. > **Note!** Chaining method calls is not an atomic operation either. The cost/benefit of implementing “transaction” and “rollback” behavior is negative.
  
-===== 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="Would you like to add support for COPA?" auth="jgivoni" voteType="single" closed="true"> 
 +   * Yes 
 +   No 
 +</doodle>
  
-The options will be:+\\
  
-  I voted yes! +<doodle title="If you voted no, what was the main reason?" auth="jgivoni" voteType="single" closed="true"> 
-  I don’t find the feature useful +   I voted yes! 
-  I don’t like the syntax +   * I don’t find the feature useful 
-  I prefer a more comprehensive solution to this problem +   * I don’t like the syntax 
-  I prefer a narrower solution to this problem +   * I prefer a more comprehensive solution to this problem 
-  This breaks backwards compatibility +   * I prefer a narrower solution to this problem 
-  This will negatively limit future changes +   * This breaks backwards compatibility 
-  This will be a nightmare to implement and maintain +   * This will have negative implications for future language evolution 
-  I prefer not to say+   * This will be a nightmare to implement and maintain 
 +   * I prefer not to say 
 +</doodle>
  
-This will help understand what the obstacles are, when studying this RFC in the future, should anyone be tempted to have another shot at object literals et. al.+\\
  
-There could be a 3rd vote on alternative syntaxes.+<doodle title="If you did not like the proposed syntax, which alternative would you prefer?" auth="jgivoni" voteType="single" closed="true"> 
 +   * A (the proposed one) 
 +   * B 
 +   * C 
 +   * D 
 +   * E 
 +   * F 
 +   * Irrelevant 
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/compact-object-property-assignment.1585020124.txt.gz · Last modified: 2020/03/24 03:22 by jgivoni