www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cent/ucent why should we implement?

reply Richard (Rikki) Andrew Cattermole <richard cattermole.co.nz> writes:
Another monthly meeting has occurred, this time one of the things 
I presented was for my PR to implement cent/ucent.

The reception was not the warmest, with questioning on why to do 
it.

Does anyone have reasons for they may want it in language?

Mine:

- Some basic arithmetic can only be described using double the 
word-size type, like with overflow, without using intrinsics.
- Atomics use it for cas
- SIMD types go above word-size.

Has anyone got any other reasons?

https://github.com/dlang/dmd/pull/23575
Aug 14
next sibling parent kinke <noone nowhere.com> writes:
On Friday, 14 August 2026 at 16:27:50 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 Does anyone have reasons for they may want it in language?
Emphasis on 'in the language', as opposed to a library type like (existing) `std.int128.Int128`, or its `core.int128.Cent` low-level foundation.
Aug 14
prev sibling next sibling parent Mindy Batek (0xEAB) <desisma heidel.beer> writes:
On Friday, 14 August 2026 at 16:27:50 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 Has anyone got any other reasons?
Straightforward C bindings and importC.
Aug 14
prev sibling next sibling parent monkyyy <crazymonkyyy gmail.com> writes:
On Friday, 14 August 2026 at 16:27:50 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 my PR to implement cent
Lincoln was a very important president and it will help D become the future of banking along with all the barrow checking work
Aug 14
prev sibling parent Johan <j j.nl> writes:
On Friday, 14 August 2026 at 16:27:50 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 Another monthly meeting has occurred, this time one of the 
 things I presented was for my PR to implement cent/ucent.

 The reception was not the warmest, with questioning on why to 
 do it.

 Does anyone have reasons for they may want it in language?
Perhaps Amaury can chime in. I remember he improved a few LLVM 128bit codegen things, clearly because he needed it. (cryptography/hashing, I suppose) cheers, Johan
Aug 14