by jjnoakes · 4y ago · 0 comments
For example, how did you accidentally get an instance of "Set" in the code path doing arithmetic on "BigInteger" instances, and why didn't that "Set" fail earlier during the other operations that are most likely being performed on the BigInteger (parsing it from a string, doing other arithmetic on it, etc)?
Because I got it as a return value from someone else’s function, and then this was the next thing I did with it.
It’s not hard to come up with everyday examples.
This is exactly the point of the article. Extremely extremely unlikely.
But if you have a real world example of this, I'm sure the article's author is interested.
I wasn't claiming it would. I was just saying Shoot() isn't exactly a common function name that would collide with anything to begin with, so it's a bit of a strawman as an example before you even need to list out multiple criteria. I'm pretty sure I've never written a Shoot() function in my life, let alone worried about it colliding with something. Compared with add(), get(), setValue(), read(), etc. which are incredibly common and thus more realistic candidates. That's all.