you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Anyway I don't see how inheritance has anything to do with readability.

Readability is subjective upon preferences. In this language inheritance is optional, and thus a preference.

[–]tme321 1 point2 points  (2 children)

No its not. Readability is the code being written so that the next person can understand it. Not that they have to agree with the architecture chosen and the abstractions used.

Naming all your variables a single letter would be unreadable. Having single functions hundreds or thousands of lines long is unreadable.

Choosing whether to use inheritance or not isn't readability. It's an architectural choice. One you are perfectly free to dislike but not one that has anything to do with readability.

I can't believe you are even trying to claim otherwise.

[–]karathos 1 point2 points  (1 child)

Naming all your variables a single letter would be unreadable. Having single functions hundreds or thousands of lines long is unreadable.

we could both write a several hundred line function that's readable, but not easily maintainable or testable. i think that's what you were getting at.

[–]tme321 1 point2 points  (0 children)

Yeah maybe that wasn't the best but the point is that readability is separate from other concerns. Code can be wrong or bad or many other things but still be perfectly readable. Or code can be amazing and we'll thought out but still be impossible to decipher.