[Tutor] Data persistence problem

Alan Gauld alan.gauld at btinternet.com
Sat Jun 22 23:10:14 CEST 2013


On 22/06/13 12:00, Steven D'Aprano wrote:

> Speaking of Java, I get a kick out of this article and love to link to
> it on every possible opportunity:
>
> http://steve-yegge.blogspot.com.au/2006/03/execution-in-kingdom-of-nouns.html

<caveat> This could get seriously OT here...</caveat>

I found that an interesting blog in that I agreed with half of it, 
disagreed with half and couldn't make up my mind about the other
half!!! :-)

But I also found the followup comments interesting.

And most interesting of all, despite the verbiage on natural languages, 
  nobody commented on the distinction  between
classes and objects.

My peeve with Java is that it is Class oriented rather than
Object oriented. Classes are common nouns (eg river), objects
are proper nouns (eg Nile).

My other peeve is static typing. I've been using OOP since
1985 in a mix of static and dynamic languages(*) and have come
to the conclusion that OOP only works properly in a dynamic
typed environment. Smalltalk, Objective C  and Python have very 
different object models and OOP idioms but all three can
produce clean elegant OOP solutions. ObjectPascal, C++ and Java
equally have different object models but all run into similar
problems with OOP. You wind up creating lots of wrapper/interface 
classes just to get round the limitations of the type strictures.

However, all successful OOP languages I've used have got
round the need for free functions by simply defining a top level 
container class called App or system or some such (or by having
functions as first class objects!). It really doesn't need to
be as big an issue as the blog makes out. The real problem
is the way the Java community have regimented the use of OOP.

(*) In approximately this order:
Smalltalk, ObjectPascal(Apple), C++, Lisp(Flavors),
ObjectiveC, ADA, Eiffel, Modula 2/3, Actor, PL/SQL,
Java, ObjectPascal(Delphi), COBOL(yes really!), Tcl(incTcl),
Python, Perl, Ruby, C#, VB, JavaScript, Lisp(CLOS).

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list