On 24.03.2024 14:13, Saki Takamachi wrote:
Hi internals,
I want to start the discussion on the PHP RFC: Support object type in BCMath.
https://wiki.php.net/rfc/support_object_type_in_bcmath
Here's another question.
1. Since we have withScale(), do we need to inherit the $scale argument
from the functional API? Can't we derive it from the object the method
is being invoked on?
So, instead, e.g.
public function add(BcNum|string|int $num, ?int $scale = null): BcNum {}
public function sqrt(?int $scale = null): BcNum {}
I'd suggest:
public function add(BcNum|string|int $num): BcNum {}
public function sqrt(): BcNum {}
but I have no clue about BCMath.
--
Aleksander Machniak
Kolab Groupware Developer [https://kolab.org]
Roundcube Webmail Developer [https://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com