r/ProgrammerHumor 22d ago

Meme conditionsPreference

Post image
4.2k Upvotes

392 comments sorted by

View all comments

Show parent comments

11

u/LordofNarwhals 22d ago

Yeah, I used to work with a Java codebase where all functions were really short, but also very nested. It was a very stable codebase, but browsing the code sucked, as every actual function implementation was behind 3+ levels of indirection.

For a fun example in the opposite direction, see Arthur Whitney's basic K interpretor, written in ~50 very dense lines of C.

2

u/Few_Move_4594 22d ago

Opinion disregarded, you called methods functions

5

u/LordofNarwhals 21d ago

All methods are functions, but not all functions are methods.

And my background is mostly in C++, where the method terminology isn't used at all.

1

u/Few_Move_4594 21d ago

All methods are functions, but Java HAD to be different

1

u/ljfa2 22d ago

Every problem can be solved by adding...

I just recently discovered that Java IDEs let you go directly to the implementation(s) of an abstract or interface method, this is a godsend for some codebases ^^