All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

In OO every class is really a 'data type'. Even in perl where there are no types:). The essence of OO is to have an object, say $obj, that is data of some type and to have methods that act upon that data: $other_obj = $obj->transform.

Sure you can have objects that don't 'contain' any data and only methods. But you end up with an ugly looking model, IMH

You may well be right and it may be the best way to think about object-oriented design, but I think most people think of it differently, for example the McGraw Hill dictionary of technology [answers.com]:

A computer programming methodology that focuses on data rather than processes

On the other hand TechWeb says:

Writing software that supports a model wherein the data and their associated processing (called "methods") are defined as self-contained entities called "objects."

But the whole thing seems confused, the wikipedia says:

Attempts to find a consensus definition or theory behind objects have not proven very successful, and often diverge widely.