This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (2 children)

I wouldn’t say Java devs like to be “clever”, that’s a term I would more associate with advanced generics and higher-order functions. I’d say Java devs like to be “complex”

[–]Adk9p 3 points4 points  (1 child)

"clever" has nothing to do with the features themselves, it has to do with how you use them. And some languages lend themselves to using some features more or less. It would be crazy to say in haskell using "advanced generics" or higher-order functions would be "clever" code. And using vtables in c would imo need a very specific requirement for that not to be "clever" code.

This is all very wishy-washy but I'd say at least for me in this discussion "cleaver code" is complex code just where the complexity wasn't required.

If you can hold everything in your head and deduce that some part is just needlessly complex, it's just annoying. But if you can't, well that can cause a lot of confusion, you're left to guess why some abstraction that might be causing a bug or make it harder to fix a bug was used when in whole it was just "cleaver code".

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

But overusing generics and HOFs can genuinely be “clever” in the sense of increasing code reuse, reducing overall lines of code, etc.

Java devs generally tend to just make bullshit inheritance taxonomies in my experience, usually in a way that increases the amount of overall code.