Search This Blog

Friday, 16 August 2013

Pure object-oriented language






 
There are many other reasons why it is preferable to use a "pure" object-oriented language, including application extensibility and real-world modeling. But what defines a "pure" object-oriented language anyway? Ask five separate people and you'll most likely get five wrong answers. This is because the requirements of a "pure" object-oriented are fairly subjective. Here's probably the sixth wrong answer:

Allows the creation of user-defined types, usually called a class

Allows the extension of classes through inheritance and/or the use of an interface

All user-created types implicitly subclass some base class, usually called object

Allows methods in derived classes to override base class methods

Allows casting a class instance to a more specific or more general class

Allows varying levels of class data security, usually defined as public, protected and private

Should allow operator overloading

Should not allow or highly restricts global function calls—functions should rather be methods on some class or interface instance

Should be type-safe—each type has some data and a set of operations that can be performed on that type

Has good exception-handling capabilities

Arrays should be first-class objects: a developer should be able to query one on its size, what type(s) it will hold, and more


 

No comments:

Post a Comment