problem with size_t and an easy solution
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 8 19:48:06 PST 2014
On Mon, 08 Dec 2014 17:33:48 +0000
Gary Willoughby via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> On Monday, 8 December 2014 at 01:30:35 UTC, ketmar via
> Digitalmars-d wrote:
> > Hello.
> >
> > i don't like `size_t`. for many month i avoied using it
> > wherever that
> > was possible, 'cause i feel something wrong with it.
>
> size_t is not too bad, it's not as alien as you may think as
> there is also std.stdint.
>
> http://dlang.org/phobos/std_stdint.html
ah, nobody uses that, and it's not even documented. a forgotten
leftover.
> Personally i don't have any issue with the naming as long as i
> know what each type represents.
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!"
i can't do that for `size_t`, though. the only thing i can do with it
is to remeber it. and i'm very bad in remembering nonsensical things.
-------------- 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/85f760f2/attachment.sig>
More information about the Digitalmars-d
mailing list