Re:Server-Side Javascript: Back With a Vengeance
by btilly on Friday December 18, 2009 @05:06PM
(#1004098)
Sorry, but it isn't that hard to build prototypes on top of classes in a dynamic language. The cleverest and shortest implementation I've seen is http://snippets.dzone.com/posts/show/3378 where the following snippet of Ruby code does it:
Proto = Class.new(Class) # Beware: magic.
def Proto.clone
Class.new(self)
end
However several other languages have implementations. For a random example see http://search.cpan.org/~teverett/Class-Prototyped-1.11/lib/C....