A brief history of JavaScript (deno.com)
from Pro@programming.dev to programming@programming.dev on 24 May 00:48
https://programming.dev/post/30903062

#programming

threaded - newest

vermaterc@lemmy.ml on 24 May 06:36 next collapse

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
tetrislife@leminal.space on 25 May 03:29 collapse

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!

tetrislife@leminal.space on 25 May 09:08 collapse

Apparently, this should be possible now (and, for apps, the result would be as “usable” as Electron) thanks to WebIDL. For example, Webkit’s code to support Javascript access of browser objects is generated from a WebIDL spec. Generating support for <your_language>'s access to Webkit’s browser objects is “just work”.

Actually, tauri.app

Enough of this tangent now!

thingsiplay@beehaw.org on 24 May 09:38 collapse

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 on 24 May 10:35 next collapse

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

thingsiplay@beehaw.org on 24 May 10:41 collapse

Thanks, I see. I’ll research and learn more about the differences. Thought this was an writing error and didn’t research yet.

vermaterc@lemmy.ml on 24 May 11:06 next collapse

I mean: it is a writing error, because you can’t compare “class based” to OOP, since they are just different things, but this is what is suspect was the case ;)

tetrislife@leminal.space on 25 May 03:05 collapse

The first fully-developed prototype-based OO language was Self, original Javascript seems quite similar.

anton@lemmy.blahaj.zone on 24 May 10:45 collapse

To my understanding, the original meaning of object oriented is more similar to what we call the actor model today.

In reference to the modern understanding of OO, js uses prototypal inheritance, which some consider closer to the original vision.