Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Prototype Based Programming Languages (bluishcoder.co.nz)
46 points by fogus on July 16, 2009 | hide | past | favorite | 10 comments


Prototypes are a huge win not just for language expressiveness, but for interpreter implementation too. My language, Nasal (http://plausible.org/nasal) uses the same tricks to implement "objects", "classes" and "modules" in script code using precisely the same internal mechanics.


How can I take this seriously when it forgets to mention Omega? the pretties little thing with prototypes.

http://www.pervasive.jku.at/About_Us/Staff/Blaschek/Omega/_R...

Blaschek's book (one of the hard-cover light blue books from the Monographs of Theoretical Computer Science series) was an absolute delightful win.


I'd never heard of Omega - it looks like it combines prototypes with optional static typing. I ordered the book, looks very interesting. Thanks!

It doesn't mention Lua, either, and Lua is used a lot in e.g. the game industry. It does mention Javascript, albeit as an afterthought.

Also, Slate: (http://slatelanguage.org/) (Never used it, though.)

I'm glad to see mainstream interest in prototype-based OO building.


I planned to go into more detail in JavaScript since it's probably the most widely used prototype based language. But the article was getting long so I left the brief mention and maybe revisit it later to compare how the limitations of only one immutable prototype slot affect usage. It's one of the reasons I left doing the examples 'as an exercise for the reader' to see how other people approach the examples given before I gave my approach.


probably the most widely used prototype based language

Not probably. It's arguably the most used programming language, period.

That being said, I'm kind of glad that you didn't go into much detail about it. There's a lot of Javascript info online, and I'm more curious about the other languages you tackled. It'll be interesting to see if there are any responses that focus on applying some of the benefits of other prototype languages to Javascript development.


No problem. It's a good article, and prototypes are deep waters. There will always be more things you could have covered. :)


I only have so much time to write - I didn't mention Cecil either :-) Thanks for the Omega pointer.


Chris, good to see you around. Your tutorials introduced me both to Dylan and Corman Common Lisp :-)


NewtonScript was another great prototype-based OO language with a good persistent storage mechanism (soups). The UI was quite interesting.


I did my master's thesis on symbiosis between prototype OO and class-based OO models in an interpreter scenario. The objects would be exposed in both directions so that you could use objects from the host language (Smalltalk) in the hosted language (a toy language developed at the university), and the other way around.

Pretty interesting stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: