Adding a new design constraint to D
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Thu Jun 16 13:18:23 UTC 2022
On Thursday, 16 June 2022 at 13:02:11 UTC, Chris Katko wrote:
> Isn't that like saying: adding a uint128 type breaks the
> language. Because you can detect it?
Depends on whether the language provides a "mandated" mechanism
in the standard library for dealing with arbitrary bit widths.
Since *cent* has been known as a potential 128bit type, you
probably should try to write generic code over integers using
generic mechanisms where available.
But yes, most extensions at the language level can break things.
It is less problematic to do it as extensions of the standard
library with optimizations (that ends up using 128 bit
instructions). The result would be the same, just non-breaking.
More information about the Digitalmars-d
mailing list