Prototypes in Self And JavaScript

brassplume brassplume at
Wed Jul 29 18:56:05 UTC 2009

Hi All, 

I'm playing with the 4.3 Mac Demo.snap image. I'm looking at the tutorial there. I've created lots of slots. I'm seeing how Morphic in that tutorial is similar to the Morphic I've used (but not programmed) in Squeak. It's all pretty cool. 

One of the things I want to get a grip on is prototypical inheritance as it relates to Self and JavaScript. I understand one lead to the other. I feel on safe ground saying that a lot of people like JavaScript, but mainly use it like C. Or they replicate classical inheritance. Have you seen a book of JavaScript design patterns? Don't bother. 

I'd really like to say to somebody: "You know, you JS programmer you. Your conception of how to use JS sucks. The reason is you don't understand prototypical inheritance. Here's what you need to know..."

And then a light would go on over their head, and they'd use JS the way it's meant to instead of the hack that it usually is. 

I'm going to read the Wiki page on Prototype-based programming, but anything you could contribute would be great. 


More information about the Self-interest mailing list