• vermaterc@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    24 days ago

    This clearly shows how chaotic development of javascript really was.

    It has always been like:

    1. Design a language for small browser scripts
    2. People suddenly start using it somewhere else
    3. It turns out it does not fit to where people try to use it
    4. Hundreds of frameworks appear to fix this, milion standards appear, people fight for years to work out a single go-to solution
    5. Return to point 2
    • Life is Tetris@leminal.space
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      23 days ago

      I suspect writing cross-platform desktop/mobile apps in HTML/CSS/JS was another big pull in this direction.

      Many popular languages are bad, yet JS is the one with a widely-deployed OS interface written in it (WebOS).

      If free-software/open-source devs hadn’t got caught up chasing all this, there was a chance of replacing JS with other languages in the stack. HTML/CSS/your_language probably for apps initially, even making browsers support plugging in languages later. The docs say anything other than JS is not supported, so no <script type=“text/your_language”>. If only!

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    23 days ago

    Netscape asked Brendan Eich to develop a scripting language that looks like Java, but be object oriented rather than class based.

    I don’t understand this part. Isn’t object oriented also class based?? I mean that’s the entire reason why classes exist, to create objects. Isn’t it? How is this separated here?

    • vermaterc@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      23 days ago

      Object oriented languages can be either class based or prototype based. Java is class based, JS was back then prototype based

      • seravenael@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        4 days ago

        They still are, the class syntax is syntactic sugar for prototype functions. I would say the only real difference right now as far as I know is that classes allow for private members(#prop), whereas prototype functions don’t.