>>14
JavaShit has ``semicolon insertion'', whereby semicolons are inserted into one's
anus code.
for (i=0; s[i] != '\n'; ++i);
s[i] = ' ';
The ``logical'' thing for that code to do is this, which replaces the first newline with a space, if you ask any JavaShit programmer.
for (i=0; i < len; ++i)
a[i] = 0
This code is even more ``logical'' to a JavaShit programmer because it does exactly what they would expect: it wastes time with a loop, and then sets the value of the last element of the array to 0.
i = len > 0 ? len - 1 : 0
a[i] = 0
This is the
OPTIMIZED version of the above code.