rfc:userspace_operator_overloading

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:userspace_operator_overloading [2020/03/23 17:21] jbtronicsrfc:userspace_operator_overloading [2020/04/06 19:31] (current) jbtronics
Line 3: Line 3:
   * Date: 2020-02-01   * Date: 2020-02-01
   * Author: Jan Böhmer, jan.h.boehmer@gmx.de   * Author: Jan Böhmer, jan.h.boehmer@gmx.de
-  * Status: Under Discussion+  * Status: Declined
   * Target Version: PHP 8.0   * Target Version: PHP 8.0
   * Implementation: https://github.com/php/php-src/pull/5156    * Implementation: https://github.com/php/php-src/pull/5156 
Line 44: Line 44:
 // Equivalent to $x = Vector3::__add($a, $b) // Equivalent to $x = Vector3::__add($a, $b)
 $x = $a + $b; $x = $a + $b;
-//Equivalent to $y = Vecotr3::__mul(3, $b)+//Equivalent to $y = Vector3::__mul(3, $b)
 $y = 3 * $b; $y = 3 * $b;
 </PHP> </PHP>
Line 161: Line 161:
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
 Add userspace operator overloading as described: yes/no Add userspace operator overloading as described: yes/no
 +
 +===== Vote =====
 +Voting started 2020-03-23 and ends 2020-04-06.
 +<doodle title="Add userspace operator overloading as described?" auth="jbtronics" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 169: Line 176:
    * [[https://externals.io/message/108300|First email discussion]]    * [[https://externals.io/message/108300|First email discussion]]
    * [[rfc:operator-overloading|Old RFC with an similar propose]]    * [[rfc:operator-overloading|Old RFC with an similar propose]]
 +   * [[https://externals.io/message/108608|Discussion part 1]]
 +   * [[https://externals.io/message/108788|Discussion part 2]]
 +
 +===== Rejectected features =====
 +  * Use interfaces instead of magic methods
 +  * Use type hints to declare supported types (this would introduce some special kind of function overloading)
  
 ===== Changelog ===== ===== Changelog =====
rfc/userspace_operator_overloading.1584984113.txt.gz · Last modified: 2020/03/23 17:21 by jbtronics