• WatTyler@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Programmer chuds get bent out of shape that HTML is the single most influential programming language ever made. Think about it, Devs post code snippets to StackOverflow, rendered in HTML. An HTML-interpreter (aka a ‘Software Engineer’) copy pastes the snippet, transpiles it into a Python file, Java file etc. and later in the process you get a binary.

    Basic Brogrammers rage against programming behemoth HTML out of bitterness that all they are is HTML’s compiler.

    • jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      For all intents and purposes, a markup document is a script that outputs a document. There’s no point in saying the HTML isn’t a programming language. Not all languages have to be general purpose.

      • pixelscript@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        The bar for me is whether the language describes an executable program that has state and control flow.

        You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don’t, personally.

        HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.

        The umbrella term I’d use for all of these is “coding”. That’s the skill of understanding structured languages and format specifications, and understanding how you can and can’t piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.

        Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don’t know. It doesn’t need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it’s just structured data.

          • pixelscript@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Stateless functions still deal with state, they just don’t hold onto it. Without state to mutate, a so-called stateless function doesn’t do anything.

            In declarative languages, your state is the sum of everything you’ve declared. You don’t query results out of thin air. Computational results logically conclude from everything you set up.

            HTML ““has state””, as in it has a DOM, but it doesn’t do anything with it. You don’t mutate the DOM after it’s built, or query the DOM to compute results that weren’t trivially evident from the state you declared.

            You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.

        • WldFyre@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          The umbrella term I’d use for all of these is “coding”.

          Saying “it’s not programming it’s coding” is like engineer “it’s not dirt it’s soil” levels of pedantry that are silly to expect people outside your profession to know.

          Hey, maybe you are engineers after all lol

          • pixelscript@lemmy.ml
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            Sure. Which is why I would only make this distinction in a place where I can reasonably expect people to know better. Like, perhaps, a niche community on an experimental social media platform dedicated to programming.

    • lightnegative@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      No. Markup languages are configuration for an interpreter.

      inb4 code is configuration for a compiler and binary is configuration for a processor

    • andrew@lemmy.stuart.fun
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      But also, you’re making a computer do what you want, and something that it wasn’t programmed by the factory to display, when you write HTML. You’re programming.

        • andrew@lemmy.stuart.fun
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          1 year ago

          Fair point. There’s a fine line between programming and creating data that a program operates on. I tend to think writing text to produce nontext output is more programming than not.

          • frezik@midwest.social
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            There are programming languages that are entirely visual. In fact, I could parse the pixels in a bitmap created by ms paint and make it into programming.

            It’s not even that hard. Assign a set of color values to a character in Brainfuck. Iterate through each pixel and do the translation. Throw away color values that don’t match. Run the result through the Brainfuck compiler.

            If I’m really crazy, I could implement the instructions directly rather than translating, but translation is easier.