Hacker News new | past | comments | ask | show | jobs | submit | VodkaInferno's comments login

size is a const int that holds a positive value so you won't ever have INT_MAX < size.


Yes, and the compiler knows that as well. GCC even merges the two versions because they're equivalent[0]

My point is, if size is dynamic, this is a dangerous optimisation.

[0] http://goo.gl/4Ev8as


I've seen this a few times at MSFT. Except that the product didn't really die because nobody wanted to take responsibility for the actual killing. And every now and then there would be a re-org, the former exec would "move on" to his next atrocity and a "recycled" exec would go in front of the team and declare his passion for the product and that this time it will be different.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: