• thingsiplay@beehaw.org
    cake
    link
    fedilink
    arrow-up
    1
    ·
    22 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
      ·
      22 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
        ·
        3 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.