rfc:normalize-array-auto-increment-on-copy-on-write

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
Last revisionBoth sides next revision
rfc:normalize-array-auto-increment-on-copy-on-write [2019/06/19 23:15] wesnetmorfc:normalize-array-auto-increment-on-copy-on-write [2019/06/28 21:07] wesnetmo
Line 1: Line 1:
-====== PHP RFC: Normalize array'"auto-increment" value on copy on write ======+====== PHP RFC: Normalize arrays' "auto-increment" value on copy on write ======
  
   * Version: 0.1   * Version: 0.1
   * Date: 2019-06-19   * Date: 2019-06-19
   * Author: Wes (@WesNetmo)   * Author: Wes (@WesNetmo)
-  * Status: Under Discussion+  * Status: Voting
   * First Published at: http://wiki.php.net/rfc/normalize-array-auto-increment-on-copy-on-write   * First Published at: http://wiki.php.net/rfc/normalize-array-auto-increment-on-copy-on-write
  
Line 18: Line 18:
 </PHP> </PHP>
  
-This is currently not guaranteed, and because of ''array''s' multiple nature, it is not+This is currently not guaranteed, and because of ''array''s' all-doing nature, it is not
 possible to always enforce this property -- but it should be in some dangerous cases, possible to always enforce this property -- but it should be in some dangerous cases,
 namely when functions from (potential) different authors are interacting. namely when functions from (potential) different authors are interacting.
Line 44: Line 44:
 </PHP> </PHP>
  
-This behavior happens, unfortunately, also between different scopes. Our functions can + 
-receive "broken" ''array''-lists from third-parties that only appear to be well-indexed, +This happens also between different function scopes. Our functions can receive "broken" 
-but that in reality are not, because they were misused during their lifetime (for example, +''array''-lists from third-parties that only appear to be well-indexed, but that in 
-it was used ''unset()'' on them, instead of ''array_pop()'').+reality are not, because they were misused during their lifetime (classic example, it was 
 +used ''unset($array[$lastIndex])'' on them, instead of ''array_pop($array)'').
  
 As result of that, despite "copy on write", the value-type semantics, and even a different As result of that, despite "copy on write", the value-type semantics, and even a different
Line 124: Line 125:
 Vote will require 2/3 majority Vote will require 2/3 majority
  
 +<doodle title="Normalize the auto-increment value on array copy?" auth="wesnetmo" voteType="single" closed="false">
 +   * Yes
 +   * No
 +</doodle>
 +
 +===== References  =====
 +
 +  * [[https://externals.io/message/105992|Pre-vote discussion on externals.io]]
rfc/normalize-array-auto-increment-on-copy-on-write.txt · Last modified: 2019/06/28 21:13 by wesnetmo