Prototype language

I am really a big javascript fan. This is a really great prototype of the OOP language. Now I want to learn some other prototype-based languages. Actually very interested in some guidelines ie How I can manage code without classes, etc. What language should I choose? Some resources in design patterns for a prototype based language?

+6
javascript design prototype design-patterns
source share
4 answers

The answer to both of your questions: Self . Self is the original OO language based on prototypes, and is also probably the best (for a completely unscientific and subjective definition of "best", of course). (In fact, IMHO is (along with Newspeak ) one of the best OO languages, period.)

In any case, the nice thing about the Self is that it also contains many excellent documentation , including, but not limited to, the famous “I” tutorial Prototype-based construction using SELF 4.0

There is also a large amount of resources on the old Self website at Sun Research :

These two (along with the guidelines mentioned above) explain exactly what you are asking. (Actually, the second pretty much contains your question “How can I manage code without classes” word for word in the title):

Then there is I; The Movie, an introductory video about the Self programming language, Self GUI, Self-system and Self VM, starring leading designers and developers. Unfortunately, it was released in 1995 on VHS, and when the video was finally digitized, the original tapes were already degraded. You can find several versions of the videos on this site with Smalltalk videos . I personally find Large QuickTime the easiest to view.

Here are some other interesting personality links:

Dave Ungar, I’m chief designer, talks at Stanford in September under the name Self and self: whys and wherefores . Streaming video of this conversation is available .

A small problem with the “I” is that in 1995 Sun abandoned it in favor of an obscure little scripting language for creating animated cartoon characters in electronic television guides on set-top boxes. (You may have heard about this, it's called Java.) Thus, the latest stable version 4.3 only works on OSX on PowerPC (maybe on x86) and Solaris on the Sparc processor. A couple of months ago, however, the Self project was again raised by some of its former members, as well as some new language fans, and now it has been ported to Linux and OSX on x86 using the 4.4 Alpha 2 release and final release expected in January .

Several other interesting prototype-based languages:

  • NewtonScript (inspired by Self) was supposed to be the Apple Newton PDA application development language; it is also a direct inspiration for JavaScript.
  • Slate is a "clean, shale, object-oriented Smalltalk-style environment."
  • Io is a prototype-based programming language inspired by Smalltalk (all values ​​are objects, all messages are dynamic), Self (prototype), NewtonScript (differential inheritance), Act1 (actors and futures for concurrency), Lisp (code - testable / modifiable execution tree) and Lua (small, embeddable)
  • Ioke is a prototype-based programming language inspired by Io, Smalltalk, Lisp, and Ruby.

Regarding your question on how to structure programs, I have to admit that I find that classes actually hide object oriented design. I mean, there is a reason why this is called Object-Oriented Programming rather than Class-Oriented Programming.

+22
source share

The best recommendations that I read to use the prototypical nature of JavaScript were in the JavaScript Good Details book, and you can apply these and other languages. I changed the way we program Python code after reading this book.

If you want to learn a language similar to JavaScript, try using ActionScript first. Both are based on the same standard. It will be easy and useful.

+3
source share

This is a great subject. I suggest you read this wikipedia article . Below you will see a list of different languages.

+2
source share

In general, javascript is the most common (and perhaps only?) Prototype-based language that is used today, but you can use the Prototype template in many different languages, such as Java and Python - see the wikipedia page for examples.

I would advise you to look for tutorials and guides on the Prototype template, and not look for a specific language to work with, especially because you are already probably the most suitable. Please note that javascript can be run on the Java platform through Rhino .

The best comprehensive introduction to prototype designs that protects their use is one of Steve Yegge's blog post , Universal Design Template.

Steve Yegge also points to Martin Fowler 's article on a topic I read to read!
0
source share

All Articles