Question

In DCI discussions, there is a usually mention of pure object oriented languages:

Object-oriented programming languages—particularly the "pure" ones—expressed everything in terms of objects or methods on objects. (Of course, most programming languages used classes to do this. The point is that nothing was supposed to exist outside of an object framework.)

Source: http://www.artima.com/articles/dci_vision.html

I'm trying to understand the difference between a pure OO language and a non-pure one in terms of DCI. To help put the differences into context, it would be good to have an example of a pure OO language so that I can contrast it with my experience with class based language such as java.

Question: What languages are pure OO languages (from the perspective of DCI)?

Was it helpful?

Solution

A non-pure OO language in this context is a language were not everything is objects. Java for example have "primitive" types, which behave differently than objects. For example, Java's primitive types are passed by value, while Java passes references when it passes it's objects.

In contrast, Python treats everything as objects, and although it has built-in types, it has no primitive types, everything is objects.

I think you misunderstand the reference to classes. I don't think they say that a pure OO language does not have classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top