Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Expressivity Limitations of Object-Oriented Programming (two-wrongs.com)
2 points by vitplister on Oct 24, 2023 | hide | past | favorite | 3 comments


This writer really doesn't understand that functions and types are themselves objects..?


Depends on the language.


> tl;dr: Writing software is encoding knowledge.

OK.

> Knowledge takes the shape of propositions.

That seems a bit reductionistic, but I'll ignore it.

> Compressing rich propositions into is-a and has-a relationships does not lend itself to clarity.

And if the only way to put knowledge or propositions into OO code was in the form of an object hierarchy, there might be a point here.

The author goes on to say:

> I’m not claiming is-a and has-a are the only types of abstraction available object-oriented languages. As a reader pointed out, most object-oriented languages have other types of abstractions which are not the object-oriented parts, like interfaces (responds-to), plain functions, and more.

OK, so despite the title, the actual point is, don't try to encode all knowledge in the type hierarchy. Well, there may be some people who need to hear that, but the good OO programmers already know...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: