News for hackers. Stuff that matters.
Re:Google SoundScript: faster OOP for JavaScript by drapper on Wednesday February 04, 2015 @05:03PM (#9000281)
> You're still creating a bunch of objects. Unless you are a mashocist (...) you are still going to want to reuse methods between those objects.

Aaaaaaand solution for that doesn't have to be a class (or something pretending to be a class), but for example a collection of functions/methods that you attach to an object, so you for example assign behaviour to data. This is something that Reginald Braithwaite for example advocates.

Re:Google SoundScript: faster OOP for JavaScript by munificent on Wednesday February 04, 2015 @07:05PM (#9000939)
> a collection of functions/methods that you attach to an object

Yes, that's what I meant when I said you have to design your own metaprogramming layer. You can do that. Just like you can invent your own class or prototype layer in C if you like.

The question is "Is having to do that a compelling feature for the language?" Are user's metaprogramming needs so diverse that the language should punt this problem onto users?

I don't see much evidence that this is the case. Most JavaScript libraries end up reinventing something that's within spitting distance of classes and single inheritance, maybe with a dash of mixins. All of that re-invention is a huge waste of engineer time.

Re:Google SoundScript: faster OOP for JavaScript by taco_emoji on Wednesday February 04, 2015 @05:33PM (#9000471)
That's called "composition over inheritance" and OO languages are perfectly capable of it.