Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@balambuc I know. But if someone actually uses that code they probably also copy-paste it for other types.
-
I bet there is a js lib somewhere doing the equivelant and its just being blindly used 😨
-
Grundeir7258yHorrible as this is, most self-respecting compilers will probably just substitute the whole thing with a constant.
Maybe compilers should also notify the police, or upload a notification onto the programmer's LinkedIn page or something. ^^ -
Awfully as it seems I recently found a similar code of one of my friends, a for-like while. I almost went to jail for premeditated murder.
-
@ralee That's the idea at some point `i` will be at the maximum value of an integer and cause an exception which would end the loop.
-
@jpichardo Actually there is no exception thrown here, but integer overflow, which will get negative number.
-
@MarounMaroun I remember trying to assign (Java) a exaggeratedly great value to a int and getting a numberformatexception
Related Rants
How to get max value of an integer
undefined
integer
java