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
-
It's the same weird feeling as encountering something like:
bool isActive;
if (isActive)
return true;
else
return false; -
In JS there are problems with ++ though, due to automatic semocolon insertion. You can still use += 1 though.
-
When my university lecturer and his assistant who is a master's cs student does that.i silently get pissed
-
Makes my shit itch when I see i = i + 1
I also never use interpreted languages, so I don't really know much about JS problems with pre- or post-incrementing.
But on group collaborations, I always try to marginalize the guys who use i = i + 1 -
@moshmage we know the difference, but except when the value of i is used before the increment, they are exactly the same in practice, so we don't care
-
I'm used to doing this but only because I used to work in a language where i++ doesn't work
-
magnusi5838y@OrestH @dandel10n how about this? :D
switch(isActive)
{
case true:
return true;
break;
case false:
return false;
break;
default:
printf("what?\n");
break;
} -
It's worse when the project's linter is set to prefer that syntax over ++, and the lead insists that's how it should be.
-
@iam13islucky can't tell you exactly but I can say it's codename was Zeus. Good God the jshintrc file was so full. All kinds a of wacky settings. I don't miss that.
-
@magnusi should I ever encouter this I will check the git logs, walk up to that persons desk, remove the hdmi cable from one screen, shout: "you'll have to earn this" and walk away.
-
magnusi5838y@dandel10n maybe you should remove both the cables, the computer, the developer and the desk because it has all been contaminated 😀
Does anyone else get really irritated when they encounter
i = i + 1
undefined