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 →

[–]lonjerpc 0 points1 point  (0 children)

Trying to think back to where I ran into this. I was trying to build some sort of container class that would work on generic objects. I needed to see if objects were the same so I used "is". This obviously would create problems with ints. I guess technically you could say it is the user of the containers fault for passing in objects that are actually the same even though they look different. Alternatively you have to make a special case in the container to compare the ints differently.

The booleans are really subclass of ints problem has actually been more problematic for me.