• grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    Netscape should’ve stuck with their initial plan of putting Scheme or Python in the browser instead of hiring a dipshit to half-ass a shitty Java-coattail-riding monstrosity.

    • Zagorath@aussie.zone
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Holy shit we almost had Python in our browsers instead of JavaScript‽ Please can I switch timelines!

    • abhibeckert@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      3 months ago

      What? That’s not what happened at all.

      JavaScript was built entirely by Netscape from the ground up with no external involvement, and that was totally their “initial plan”. It shipped in testing (under the name “LiveScript”) within months of Netscape 1.0.

      And then Sun Microsystems paid Netscape a lot of money to rename it to JavaScript and pretend it was related to Java, even though it had nothing at all to do with Java.

      • grue@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        From https://webdevelopmenthistory.com/1995-the-birth-of-javascript/ :

        However, Eich didn’t think he’d have to write a new language from scratch. There were existing options available — such as the research language, Scheme, or a Unix-based language like Perl or Python. So when he joined, Eich “was expecting to implement Scheme in the browser.” But the increasingly fractious politics of the software companies of the day (it was, basically, everyone against Microsoft) soon saw the project take a more creative turn.

        On 23 May 1995, Sun Microsystems launched a new programming language into the world: Java. As part of the launch, Netscape announced that it would license Java for use in the browser. This was all well and good, but Java didn’t really fit the bill for the web. Java is a general-purpose programming language that promised Write Once, Run Anywhere (WORA) functionality, but it was too complicated for web designers and other non-programmers to use. So Netscape decided it needed a scripting language, which was a trendy term at the time for a smaller, easier to learn programming language.

        Netscape’s relationship with Sun soon influenced the scope for Brendan Eich’s project. The language he’d be developing now wouldn’t be based on Scheme; instead it would have to be somehow connected to Java. The idea was to have JavaScript and Java be the programming equivalent of Microsoft’s Visual BASIC (the easy one) and Visual C++ (the hard one).

        The decision was made that JavaScript — or “Mocha” as it was originally code-named within Netscape — would “look like Java,” but be an object-based language rather than class-based like Java. Eich recalled later that “I was under marketing orders to make it look like Java but not make it too big for its britches … [it] needed to be a silly little brother language.”

        • sudo42@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          QQ: What’s the difference between a “class-based language” and an “object -based language”?

          • grue@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            3 months ago

            In a class-based language, you declare the specification for a class and then (separately) instantiate members of it. You can also do inheritance and such.

            In an object-based language, you instantiate an object by explicitly declaring and setting the values of all the properties inside and then its type is defined to be itself. You can then make more objects of the same type by instantiating them and passing in the first object as the prototype to use.

        • icesentry@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          3 months ago

          It’s weird that you are aware of this but still decided to prsent it as “hiring a dipshit to make a shitty java clone”. It pretty clearly says that Eich wasn’t the one that wanted to make it java-like.

          • grue@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            3 months ago

            I didn’t call it a “shitty java clone;” I called it a “shitty Java-coattail-riding monstrosity.” There’s a difference.

            Specifically, I was referring to how the only reason it was created – the only reason using an existing language wasn’t good enough – was to capitalize on Java’s hype, not claiming that there was any sort of meaningful technical resemblance (because aside from both having vaguely Algol-style syntax, there isn’t).