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
-
olback106466yYour editor usually screams at you when you have a missing semicolon. Unless you use notepad or something 🤷♂️ -
Konsole30066y@cprn Oh I was using debugger. Just wasn't setting the right break points.
That 'if' looked really innocent -
kamen67656yThis is not even a syntax error or a typo. If your logic is false, it doesn't necessarily have anything to do with the code.
-
I once lost a day because of
if (x == y);
do_stuff();
And I'm still salty to this day 🙃🙃🙃
(Because of my vs code theme I can hardly see semicolons) -
@beggarboy
Konsole never said what launguage he is using and because === is a JS thing that code wouldnt work in C# -
C0D4644176y@Gregozor2121 but it's not just a JS thing 😏
But yes C# doesn't have a ===
But you could still do if(x == false){}
The only difference is Js and others use "==" as comparison, where "===" is type checked as well in order to prevent the following:
let x = 1;
If(x == true) // this is true
If(x === true) // this is false -
c3ypt1c95636yYou cannot find semicolons like this...
if ( x ) ; {
Thing() ;
}
...In java and eclipse does not report it as an error.
Lots of time wasted on that one.
Related Rants

The power of passwords!!!1
People always say how they lost couple fucking hrs because of a bloody ';'.
You know what.. '!' are mush worse.
I just lost 2.5 hrs debugging because i had written if(x){} instead of if(!x)
semicolons you can find at compile time.
! are the true morons
rant
!
not