|
|
|
|
|
by userbinator
1778 days ago
|
|
I think it's a combination of effort and culture that leads to such differences in style; in C, creating objects and functions and overriding them etc. takes far more effort than it does in Java (where IDEs can also generate tons of code automatically), so programmers naturally think more about whether the additional effort expended is worth it. Asm is an even more extreme case in the C direction --- every additional machine instruction is explicitly written, and so is dispensed with if not absolutely necessary. That said, I've also seen "object-oriented obfuscation" in C, so some people seem to just love complexity and writing tons of code to do a simple task, or were taught "abstraction is great, use as much of it as you can" and never thought about when to stop. Overabstraction usually increases macro-complexity while decreasing micro-complexity; a function with a single line of code is "simpler" in that its immediate purpose may become obvious, but having to mentally stack from its callers means that the big picture is harder to comprehend. At the extreme high end of density are languages like the APL family, where the density is so high that the "big picture" becomes a slightly smaller one, and Arthur Whitney has been famously quoted as hating scrolling; but at that density, you can no longer "skim" large portions of code --- instead, each individual character needs to be read and pondered carefully, because each one says a lot. |
|