Medium - Object-Oriented Programming — The Trillion Dollar Disaster - 2

원문 - Ilya Suzdalnitski

Trend 파악을 Medium 기고문 요약 포스팅 - OOP, 막대한 금전적 재앙 2

We Got OOP All Wrong

Messaging

Photo by Muukii on Unsplash

OOP in its purest form

Code Complexity

With OOP-inflected programming languages, computer software becomes more verbose, less readable, less descriptive, and harder to modify and maintain. \— Richard Mansfield

The Problems of State

Photo by Mika Baumeister on Unsplash

Mutable State — the act of mental juggling

I think that large objected-oriented programs struggle with increasing complexity as you build this large object graph of mutable objects. You know, trying to understand and keep in your mind what will happen when you call a method and what will the side effects be. \— Rich Hickey, creator of Clojure

Image source: https://www.flickr.com/photos/48137825@N05/8707342427

Real-world example, please!

Limitations of the Human Brain

Scattered state

Photo by Markus Spiske on Unsplash

Promiscuously shared state

Concurrency issues

Not all state is evil

Mutability is Inherent to OOP

The Trojan Horse of Encapsulation

Photo by Jamie McInall from Pexels

The global state problem

Methods/Properties

The Problem with Real World Modeling

Photo by Markus Spiske on Unsplash

The real world is not hierarchical

Inheritance in the real world

The real world has no methods

The Kingdom of Nouns

Objects bind functions and data structures together in indivisible units. I think this is a fundamental error since functions and data structures belong in totally different worlds. \— Joe Armstrong, creator of Erlang

Photo by Cederic X on Unsplash


© 2019. All rights reserved.

Powered by Hydejack v8.1.1