• Mihies
    link
    fedilink
    arrow-up
    8
    ·
    4 months ago

    I always wondered how is HTML a language… Also I see missing labels in legend.

    • remotelove@lemmy.ca
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      4 months ago

      It’s a markup language(ish) but it’s not a programming language. XML would be closer to programming, IMHO, since you could have simple things like recursion. That example is even pushing what I would consider “programming”, but anyone can feel free to disagree.

      SQL is in the same category for me. It’s a query language and can get super complex, perform some basic logic, but you can’t exactly write “snake” in it. Sure, you could use cmdshell or something else to do something more complex, but that would no longer be SQL.

      My simplistic expectation of an actual programming language would be that you can automate an entire platform at the OS level (or lower) instead of automating functions contained within a service or application. (JVMs and other languages that are “containerized” are weird outliers, by my definition.)

      I am not trying to step on anyone’s toes here. I just never have really thought about what I personally consider a programming language to be.

      • mox@lemmy.sdf.orgOP
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        4 months ago

        It’s a markup language(ish) but it’s not a programming language. XML would be closer to programming, IMHO, since you could have simple things like recursion.

        One could also view it a different way:

        XML merely provides abstract structure. It doesn’t direct that anything be done. By itself, it doesn’t program anything.

        HTML, on the other hand, directs web layout engines to produce outputs. It programs them.

        SQL is in the same category for me.

        SQL directs databases to manipulate data and relations, and to produce results. It programs them.

        Imperative and functional programming are often what come to mind first, at least for many of us, but declarative programming is nevertheless programming.

        • TehPers@beehaw.org
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          4 months ago

          Pushing HTML even further, one could say it’s a declarative programming language that programs a UI in a mostly-stateless manner (inputs aren’t really stateless but you can argue the state is provided by the UI rather than managed by HTML).

          I’m not sure I’d make this leap myself though, I have a hard time classifying it (or any other markup language) as a PL. As far as I am aware, you can’t really program a state machine with pure HTML, though you can accept inputs and return outputs at least.

      • Mihies
        link
        fedilink
        arrow-up
        3
        ·
        4 months ago

        What can I say, I agree with you. This mixing of markup, query and general programming languages is not exactly a good comparison