オブジェクト指向はクソか?

はじめに


qiita稿


JavaClojure Clojure

Why OO Sucks

http://www.sics.se/~joe/bluetail/vol1/v1_oo.html

ErlangJoe Armstrong


Joe Armstrong


 

 OOP"swearing in church"

 

 ErlangErlang

ErlangOO

7IEEEIBMKeyIBM PrologOO


"Suck"


OOPOO

 - 


Objection 1 - Data structure and functions should not be bound together









T1T2


 - 


(Objection 2 - Everything has to be an object.)

OOOOErlang
-deftype day() = 1..31.
-deftype month() = 1..12.
-deftype year() = int().
-deftype hour() = 1..24.
-deftype minute() = 1..60.
-deftype second() = 1..60.
-deftype abstime() = {abstime, year(), month(), day(), hour(), min(), sec()}.
-deftype hms() = {hms, hour(), min(), sec()}.
...




-


(Objection 3 - In an OOPL data type definitions are spread out all over the place.)

ErlangCinclude fileOOPL

使

LISP



OOPL

 - 


Objection 4 - Objects have private state.

(state)





OOPL

CPasal

DCG

OOPLOOPL




Reason 1 - It was thought to be easy to learn. Reason 2 - It was thought to make code reuse easier. Reason 3 - It was hyped. Reason 4 - It created a new software industry.

12OOP