Nothing too serious, i want to hear your petty, your eccentric, your off beat takes.

  • PeriodicallyPedantic@lemmy.ca
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    4 days ago

    Code semantic should be separate from code presentation.
    In other words, tabs vs spaces is a stupid argument.

    We’ve learned that separating semantics and presentation is good for the code we write but we’ve never bothered to apply it to languages. Everyone on the team should be able to apply their own formatting preferences without affecting the underlying file.

    • Zexks@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      Python is the only langauage where this matters. You can write pretty much every other langauage in one long string if you want (fhats what the compiler does to it). But that makes it really hard to read

      • PeriodicallyPedantic@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        3 days ago

        Thats not what I’m talking about.

        python is one of the few popular languages where presentation is semantic but I’m talking about separating semantics from presentation. you should be able to radically change how you see the code without actually changing the file.

        I should be able to apply a personal style to the code and view it with small indentations, or large indentations, with line widths of 80char or 120char, function args within parentheses or not. I should even be able to localize it into another natural language, or even view and edit it as a flow chart instead of text, all without actually changing the underlying file that contains the semantics.