Hacker News new | ask | show | jobs
by fleitz 5126 days ago
It is, but on the other hand if you write code to work with sockets then you get a performance boost on spinning disks because your IO is sequential. And many other benefits like trivial cache prediction, buffering, etc.

I do think that prototypes have useful properties, but I'm not sure that a prototype isn't a form of an open class. I tend to think that the biggest problem with prototypes in js is the interface.

1 comments

Prototypes in JS are problematic due to false cognates- it tried to look like Java (due to marketing department fuckery), and use the same keywords as java, but it doesn't act at all like Java which leads to some nasty surprises. This has been fixed in ES5- the correct way to inherit from a prototype is no longer via constructor functions and their prototype property, but via Object.create()