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?
Object oriented languages can be either class based or prototype based. Java is class based, JS was back then prototype based
Thanks, I see. I’ll research and learn more about the differences. Thought this was an writing error and didn’t research yet.
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 ;)
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.
This clearly shows how chaotic development of javascript really was.
It has always been like:
- Design a language for small browser scripts
- People suddenly start using it somewhere else
- It turns out it does not fit to where people try to use it
- Hundreds of frameworks appear to fix this, milion standards appear, people fight for years to work out a single go-to solution
- Return to point 2