Scripting Languages and Prototyping

November 25, 2010

Prototyping — instantiating an object from another object rather than a class– is a useful feature in an object-orientated scripting language. (Javascript is an example of language with this feature).

A feature of scripting languages is that each line does some work — it should be possible

to write a 2 or 3 line programme that does something useful, and the “hello world” programme should be one line long. Scripting langiages are intended for small projects and immediacy. Class-based OO does not suit this , since there could be significant preamble before getting to the meat of the matter. Consider

with the Java “Hello World”

public static void main(String args[])
System.out.println("Hello World!");

Prototyping allows one to construct a useful object, rather than a class,

and inherit from that, obviating the need for a class framework that must

be instantiated before anything happens.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: