• Ethan@programming.dev
        link
        fedilink
        English
        arrow-up
        15
        arrow-down
        4
        ·
        19 hours ago

        Indentation-driven control flow is one of the most cursed things ever invented, excluding things explicitly designed to inflict pain or death.

        • KSP Atlas@sopuli.xyz
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          Haskell has the choice of both indentation based and brackets for things like do blocks, but most people use indentation based cause it’s the norm and looks cleaner

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      14
      arrow-down
      3
      ·
      19 hours ago

      List comprehensions are much stranger than tabs vs spaces. There are very very very few languages that use them, and python’s is by far the worst out of the popular ones.

        • unit327@lemmy.zip
          link
          fedilink
          arrow-up
          5
          ·
          10 hours ago

          The concept of a list comprehenshion is sinple but syntax is awful, as if Yoda was writing a for loop. “x for x in y it is, hmm yes”.

    • aloofPenguin@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      4
      ·
      20 hours ago

      This is the one thing I hate about python, because the spacing would differ between editors. I used vim to create the files on one system, and geany to edit them on another. Via uses 8 spaces in a tab (at least for me), while geany uses 4. This makes python mad, and drives me crazy.

      Also, the rules for whitespace separation between things like loops, methods, and the rest of the code is annoying/ wierd (at least to me).

      • who@feddit.org
        link
        fedilink
        English
        arrow-up
        14
        ·
        17 hours ago

        Via uses 8 spaces in a tab (at least for me), while geany uses 4.

        You know that editors let you change their defaults, right?

        • Eager Eagle@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          16 hours ago

          and that indentation defaults in decent editors are usually language dependent. I’m not familiar with these editors, but… come on - if they use one default for all files, OP should use a better tool.

        • aloofPenguin@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          16 hours ago

          Yes, but I don’t normally program in python, so I never did. When I had to, I never thought of changing it (it wasn’t for long anyways and was less of a thought out decision to do programming in vim)