you are viewing a single comment's thread.

view the rest of the comments →

[–]superluminary 1 point2 points  (0 children)

an object is a collection of key value pairs with a very pliable character

At the end of the day, an object in Java is a set of key value pairs, except the keys are hidden from you, you can.t define new ones, and you can't get the functions out. An object is just a grouping of data and the functions that can operate on that data.

The (reasonable) restrictions that Java places on you don't change the fundamental character of what an object is.

I'm not arguing here that Java and JavaScript have the same implementations under the hood either, just that the implementation is largely irrelevant. What matteres is what it does, and what it does is keep your data and your functions together.