Comment by auxiliarymoose

Comment by auxiliarymoose 4 hours ago

1 reply

For me at least, I find it easier to see the shape of algorithms, control flow, and expressions when the variable names are concise. But this also might be because I have found Go to fit my use-cases and thinking style well, and Go programs tend to follow this naming convention.

For example, if I have a struct `PageEntity` with a field `Id`, and I am iterating over a slice of such IDs, I would prefer using `pid` instead of `pageEntityId` as the variable name. But Java APIs and conventions tend to use these longer names, so I find it takes more thinking to remember the different names instead of quickly seeing the behavior of code at a glance.

Java also tends to have a lot of inheritance which results in these long glued-together names and makes it harder to follow program flow because behaviors get introduced in multiple different places (i.e., it has the opposite of locality of behavior).

But those are just my opinions and experiences! I know many people love Java, and it is a versatile and powerful language.

gf000 2 hours ago

That's really funny that you complain about complexity and then use Go which is a significantly more verbose language...