About size_t ?

Help
VO 01
2010-04-17
2012-12-21
  • nythrix

    nythrix - 2010-04-19

    No. Or rather, I don''t think this is such big an issue as to deserve its own type. Cloo uses IntPtrs for the internal bits and longs for the public API. Works flawlessly in both 32 and 64 bits.

    The main point of SizeT is introducing +,-,* and / over IntPtr. But frankly, I can't see why. I have never used IntPtr for arithmetic operations nor have I seen code that does that. Also memory handling in .NET is done through IntPtr (pointers, sizes) and that means that unnecessary casts are introduced.
    Last but not least: casting IntPtr to int/long and back is faster than running your own number type anyway.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks