• Natanox@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 hours ago

    Meaningful Indentation > Unnecessary visual clutter

    I will die on this hill. Python is wonderfully readable as it saves on unnecessary characters because indentations as well as line breaks are (usually) part of the syntax. Something like C++ with all its :;{}<> is just painful to read, not to mention annoying to write on many non-US keyboard layouts such as german without modifications.

    • eldavi@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      3 hours ago

      said like someone who’s never had to parse through 10k+ lines of python source without an IDE. lol

      • Dunstabzugshaubitze@feddit.org
        link
        fedilink
        arrow-up
        3
        ·
        8 hours ago

        i code using a german layout and to type any kind of bracket you have to use a modifier key and a number. its awkward, but i am to lazy to switch between layouts and sometimes work on machines where i can’t change the layout easily.

        python is quite nice to programm on a german layout, because it tends to have fewer braces than other languages.

        tl;dr: german keyboard layout “hides” many symbols on a second layer beneath the number row which makes it awkward to use for many programming languages.

  • vatlark@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    12 hours ago

    She wants to be chosen. In python semicolons are optional in most cases. You choose to add them… mostly because you have been writing a lot of c lately

  • roz@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    7
    ·
    19 hours ago

    What’s worse, that Python doesn’t need semicolons, or that if used, they are ignored? 🤔

    • usernamesAreTricky@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      14 hours ago
      >>> print("proof by counterexample in a python REPL")
      proof by counterexample in a python REPL
      >>> x = 2; print(x)
      2
      >>> print("this is not ignored"); print("it's just mostly useless"); print("but you can use as many as you want")
      this is not ignored
      it's just mostly useless
      but you can use as many as you want