The type/object distinction and possible synthesis of OOP and imperative programming languages

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Apr 18 23:38:34 EDT 2013


On Thu, 18 Apr 2013 19:30:39 -0700, Mark Janssen wrote:

> On Thu, Apr 18, 2013 at 7:10 PM, Ned Batchelder <ned at nedbatchelder.com>
> wrote:
>> You won't solve the problem of confusing, ambiguous, or conflicting
>> terminology by making up a rule.  "Object-oriented" means subtly
>> different things to different people.
> 
> That's a problem, not a solution.

It's a fact, not necessarily a problem.

"Sandwich" means subtly different things to different people in different 
places, but human beings manage to cope, and very few people accidentally 
eat a sandwich of differently doped silicon crystals (i.e. a transistor) 
when they intended to eat a sandwich of bread and cheese.

So long as people recognise the existence and nature of these subtle 
differences, it's all good. Java's OOP model is different from Python's, 
which is different from Lua's, which is different from Smalltalk's. 
That's all grand, they all have their strengths and weaknesses, and if 
all programming languages were the same, there would only be one. (And it 
would probably be PHP.) 


>>  It turns out that computing is a complex field
>> with subtle concepts that don't always fit neatly into a
>> categorization.
> 
> But that is the point of having a *field*.

Reality is the way it is. However we would like fields of knowledge to 
neatly fit inside pigeonholes, they don't.

 
>> Python, Java, Javascript, Ruby, Smalltalk, Self, PHP, C#, Objective-C,
>> and C++ are all "object-oriented", but they also all have differences
>> between them.  That's OK.  We aren't going to make up a dozen words as
>> alternatives to "object-oriented", one for each language.
> 
> Well, you won't, but other people *in the field* already have,
> fortunately.  They have names like dynamically-typed, statically-typed,
> etc.

They are not names for variations of OOP. They are independent of whether 
a language is OOP or not. For example:


Java is statically typed AND object oriented.
Haskell is statically typed but NOT object oriented.

Python is dynamically typed AND object oriented.
Scheme is dynamically typed but NOT object oriented.



-- 
Steven



More information about the Python-list mailing list