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
-
olback109815yYour editor usually screams at you when you have a missing semicolon. Unless you use notepad or something 🤷♂️
-
Konsole31215y@cprn Oh I was using debugger. Just wasn't setting the right break points.
That 'if' looked really innocent -
kamen69925yThis 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# -
C0D4681455y@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 -
c3ypt1c99055yYou 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
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