Standardize base types for metaprogramming

Daniel N no at public.email
Sun Mar 10 08:29:53 UTC 2024


On Sunday, 10 March 2024 at 02:24:31 UTC, monkyyy wrote:
> On Saturday, 9 March 2024 at 20:13:42 UTC, Walter Bright wrote:
>> 
>> I'm not so sure about this. Is "" really a zero? max-1 are not 
>> invalid values for ints.
>
> I believe an empty string is the smallest string possible
>
> max-1 is so negative != invalid for unsigned ints
>

There is some precedens for this, ex memset_s.
https://en.cppreference.com/w/c/string/byte/memset

which uses rsize_t and RSIZE_MAX, defined as (SIZE_MAX >> 1).

Sadly the industry adaptation rate of this feature has been quite 
poor.




More information about the dip.ideas mailing list