[OT] The Usual Arithmetic Confusions
Nick Treleaven
nick at geany.org
Fri Feb 18 11:29:04 UTC 2022
On Friday, 18 February 2022 at 09:27:08 UTC, Nick Treleaven wrote:
> We need an error, not an implicit conversion. I expect you to
> say that will force users to cast, which can introduce bugs if
> the source type changes.
In fact, a cast that changes both the integer size and the
signedness at the same time could be made an error as well.
> The solution to that is to encourage using e.g. std.conv.signed:
> https://dlang.org/library/std/conv/signed.html
Of course, these would be easier to use if they were in object.d.
More information about the Digitalmars-d
mailing list