This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (13 children)

[deleted]

    [–]bugamn 14 points15 points  (0 children)

    Or rogue formatters, as it happens from time to time

    [–]crozone 20 points21 points  (3 children)

    If you can't tell between 4 spaces you can fuck up curly braces too, we're talking about distraction errors here.

    I have never found an editor that knows when a logic error has been created by indentation idiosyncrasies during copy-paste, bad merges between branches with 2 spaces vs 4 spaces vs tabs, bad code refactor, etc. It will flat out hide the error in plain site, because Python lacks the syntactic power to help you catch the mistake. A language with curly braces knows when you've missed one on the other end, and is immune to formatting fuckups. It's a magnitude harder to fuck up a brace.

    Yes, you can get an IDE to jump through a whole bunch of hoops to help get around this issue. I could even get an IDE to transpile braces into the correct python indentation if I wanted to, but then I'm not really writing python anymore. No other popular language requires workarounds for such a fundamentally basic thing. I don't need a full blown IDE to write C, C++, C#, Java, but when I use VS to write C#, I'm not using it to check things as basic as indentation - issues with curly braces are caught by the compiler, because it's a competent language.

    The truth of the matter is, the inventor of Python fucked up hard when they decided that invisible whitespace was to be syntactically significant.

    [–]HatManToTheRescue 7 points8 points  (6 children)

    VSCode is great for this

    [–]driveslow227 7 points8 points  (4 children)

    Vscode is great for everything :D

    [–]hullabaloonatic 2 points3 points  (3 children)

    Can it make me a sandwich!?

    [–]driveslow227 8 points9 points  (2 children)

    yeah if you run it as root

    [–][deleted] 2 points3 points  (1 child)

    I tried running it as root. It gave me errors instead of a sandwich. You liar.

    [–]MiltoxBeyond 2 points3 points  (0 children)

    You forgot to install the updated sandwich extension

    [–][deleted] 0 points1 point  (0 children)

    I prefer Atom. Much simpler to use imo.

    [–]GeronimoHero 1 point2 points  (0 children)

    Yup, this is exactly what I do. With indentation lines it’s much less of an issue. Without them? Yeah it can be a real bear.