News for hackers. Stuff that matters.
Re:Prototypes Are Not Classes by Jare on Sunday January 19, 2014 @07:03PM (#7086709)
I've never heard anyone, experienced or newbie, say "JavaScript has classes". People at best will say "You can sort of make classes in JavaScript using objects".

To me a Class has always been "a family of objects with the same structure and behaviour, and a way to create them". Stuff like hiding, constructors, type checking, polymorphism and inheritance are interesting, but secondary details. But then, I was taught OOP using Modula-2 back in '89, so I'm used to the idea that language features and paradigm features need not match 1:1

Re:Prototypes Are Not Classes by roel_v on Monday January 20, 2014 @05:37AM (#7088761)
Your first and second paragraph seem contradictory to me. Javascript, through what is called 'prototypes', has "a family of objects with the same structure and behaviour, and a way to create them", and varies only in implementation and semantic details from other languages. So I agree with your second paragraph and would say that JS does have classes, but then I'm not sure what your first paragraph means.
Re:Prototypes Are Not Classes by Jare on Monday January 20, 2014 @06:48AM (#7089016)
You can use objects and prototypes to build classes, but they are not classes by themselves. Similar to how you can use objects to create a linked list, but the language itself does not have linked lists.