Re: Proposal: Arbitrary precision native scalar type
| From: | Saki Takamachi | Date: | Mon, 08 Apr 2024 10:16:12 +0000 |
| Subject: | Re: Proposal: Arbitrary precision native scalar type | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123036@lists.php.net to get a copy of this message | ||
Hi Rowan,
> Again, I don't think "has more than one attribute" is the same as "feel
> almost like objects". But we're just getting further away from the current discussion, I
> think.
> The proposed class is called BCMath\Number, which implies that every instance of that class
> represents a number, just as every instance of a class called DateTime represents a date and time.
>
> In the end, a class is just a type definition. In pure OOP, it defines the type by its
> behaviour (methods / messages); in practice, it also defines the properties that each value of the
> type needs.
>
> So I am saying that if you were designing a class to represent numbers, you would start by
> saying "what properties does every number value have?" I don't think "rounding
> mode" would be on that list, so I don't think it belongs on a class called Number.
We should cool down for now. At the very least, this is the place to discuss Alex's proposal,
not to comment on my RFC.
If a deeper discussion is needed, we can do that in a new thread.
Regards.
Saki