In this letter, Dijkstra talks about readability and maintainability in a time where those topics were rarely talked about (1968). This letter was one of the main causes why modern programmers don’t have to trouble themselves with goto statements. Older languages like Java and C# still have a (discouraged) goto statement, because they (mindlessly) copied it from C, which (mindlessly) copied it from Assembly, but more modern languages like Swift and Kotlin don’t even have a goto statement anymore.

      • atzanteol
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 months ago

        This is true. It’s also a very far way from “Java still [has] a … goto statement, because they (mindlessly) copied it from C”.

    • mrkite@programming.dev
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      7 months ago

      And yet it’s still easy to write spaghetti code in Java. Just abuse inheritance. Where is this function implemented? No one knows but the compiler!

      • SatouKazuma@ani.social
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        And don’t forget to use miracle sort for any sorting needs you have. Why do the work yourself when you can just hope it gets solved for you?!

      • atzanteol
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        You can write bad code in any language you like.

      • warlaan@lemm.ee
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        7 months ago

        That doesn’t make it spaghetti code though. In well-written OOP code you shouldn’t care where a function is implemented. The problem is a much too high level of abstraction. If your high level code is so abstract that it is only running tasks and handling messages there’s no way to write it in a way that prevents mistakes because you couldn’t possibly know what the actual implementations do.