38

Who the fuck came up with the idea of using indentation instead of braces? I wasted 5 fucking hours of my life tracing a bug which eventually came down to incorrect indentation of a return statement which pushed it inside the loop!!!!!!!!!!!!!!! FML

And the PR has already been merged into master! How will I face everyone on Monday!

Comments
  • 13
    At least it teaches you to indent properly. For years I have cringed over people's bad indentation, at least there's some relief now
  • 2
    Had to struggle alot starting with python. Its common, you'll get used to it.
  • 3
    That's the main reason why I quit python. Wasting time finding a line with erroneous tabs/spaces is bigger waste of time than looking for that one missing ;
  • 2
    @soulsuke I made a rule in my ide to display spaces only preceded by whitespace in red.
  • 1
    Actually, that whole shit stems from the days of punch cards, just like the 80 characters per line.
  • 2
    It would be fine if there wasn't the issue of tabs vs spaces, or better at least.
    Once I had to deal with this problem in a python codebase that had both 💀
  • 3
    @GeaRSiX I'm using tabs on the keyboard, but since space using devs earn more on average, my editor converts tabs into spaces.
  • 0
    Weird enough, some people actually prefer indentation-based languages to braces/closed-scope-based languages.
  • 3
    Fuck python for that reason.
  • 1
    Switch to Ruby 😜
  • 1
    Come on guys, any IDE detect indentation error and compiler give the line that failed. It's like complaining about missing ';' in other languages
  • 1
    @Gnonpi no. It's like pushing a return statement inside a for loop, but there a curly brace would make it more visible. And that a function with a specific return type would show an error.
  • 0
    @BugsBuggy ok, then yes an ide wouldn't show it.
    Maybe the type hints introduced in Python 3.5 can help with your problem?
  • 1
    @Gnonpi we only support till Python 2.7.11 on the software we have built :/
  • 0
    @Fast-Nop *insert Java joke here*
Add Comment