problem with size_t and an easy solution

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 9 01:41:55 PST 2014


On Tue, 09 Dec 2014 08:26:18 +0000
Kagamin via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Tuesday, 9 December 2014 at 03:48:17 UTC, ketmar via 
> Digitalmars-d wrote:
> > i can remember that too, but i prefer to have the things that i 
> > can
> > logically deduce. i can deduce `usize`: "ah, it's size. and it's
> > unsigned. D tends to add 'u' for unsigned types and naming 
> > 'size' as
> > 'size' is logical. so it must be 'usize'. hit!"
> 
> Size is unsigned for being positive. Why emphasize it again?
to stop people think that they can safely subtract one size from
another. that 'u' will remind them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141209/4b8a43d0/attachment.sig>


More information about the Digitalmars-d mailing list