34

I still don't get people that complain about debugging a missing semicolon...

Comments
  • 3
    probably newcomers. Anyone who has coded for at least 100 hours will get a semicolon error easily
  • 5
    Javascript for example sometimes doesn't give you the ';' error.
  • 4
    @liverreich I see, but still, forgetting a semicolon is one of my least-made mistakes. Maybe for people who use Python a lot?
  • 2
    @liverreich ummm...Javascript doesn't need a semicolon
  • 5
    @tahnik Officially it does, but sometimes you can get away with not using one (iirc)
  • 1
    @LucaScorpion What I meant is it never generates an error
  • 1
    @LucaScorpion That moment you find a colleague on devRant
  • 1
    @tahnik Yes it does. I forgot the semicolon afterwards a var declaration and my whole code broke.
  • 1
    @ChappIO Heya! I actually came here because you mentioned it once ^^ (thanks btw)
    http://stream1.gifsoup.com/view/...
  • 1
    @620hun Might be some rare cases
  • 1
    There are some cases where ASI will fail in Javascript.
  • 2
    For languages like JavaScript there are plenty of plugins for editors such as atom andvs code that will give you syntax errors and warnings. if you don't want to use that write a console app that logs out line numbers that dont end in a semi colon (skipping lines that end in ")" "{" "}" ) and add it to path environment variable. helps me a lot. I wrote one to find the bastard spacing in js that Firefox hates too :)
  • 1
    @Sykoah That's actually a pretty neat idea. Don't forget to ignore comments too ;) Also you might not want to ignore lines ending in ')', because of function calls (func();)
  • 1
    @LucaScorpion yeah I tend not to do that in js due tot he fact the code will run without error missing that colon even using 'use strict' and adding that rule in prints lines for function definitions. I think I do have that rule implemented in my command line app but with a lot more logic to identify a definition from a call :) cba to comment the entire process though lol
  • 0
    I personally prefer having my syntax on point and not using any shorthands. I let Closure Compiler do the dirty work.
  • 1
    This is in c#, try c++ you will get 20 errors half of them about a semicolon because you forgot to add a using directve.
Add Comment