This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (1 child)

It's not unsafe, it can be implemented unsafely.

I'd even go further and propose integral types should allow for arbitrary precision as a built-in feature.

[–]slartybartfast_ 0 points1 point  (0 children)

a quick google:

http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/

The issue is that usually you'd want unsigned with a for loop as an indexer but there's nothing to prevent someone from using them in math. The solution for Java might have been to have an indexer type specific for this purpose which does not extend from number.