Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think I see what you're saying, but the context here was asking for cases where omitting semicolons causes non-obvious bugs. I mean:

    if(x)
    return
    "foo"
clearly there's a bug there, but adding in semicolons wouldn't change the code's behavior. So it doesn't affect the "is it bad to omit semicolons?" debate either way.


    if(y) return
      "bar"
The linter will tell you there should be a semicolon, and you are like, - no it shouldn't.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: