3 ms·
yuck. stuff like code folding and automagical code generation encourage all the wrong habits. Simple, readable, and reused code is "tight".
by nikolaj 19y ago
yuck.
stuff like code folding and automagical code generation encourage all the wrong habits. Simple, readable, and reused code is "tight".
- Zak 19y agoAn upvote alone cannot express how much I agree. I spend a lot more time reading code (even my own) than I do writing it. Code generation and concise languages reduce the effort of writing code by similar amounts, but concise languages reduce the effort of reading code by an order of magnitude or two.
- deleted 19y ago[deleted]
- cstejerean 19y agoI don't know if that's true. What reduces the effort of reading code is using the right abstractions in the code. Concise languages can make some code incredibly hard to understand. I'm switching between Python and Lisp these days but I have never had problems reading things like Java because of the verbose syntax. I do however have problems reading Perl or badly written code in any language.
- nostrademons 19y agoconcise != short. You can have short code by using single-letter variable names and avoiding whitespace. It doesn't gain you anything. But concise code says exactly what it needs to say and no more, and that can be much more readable than lots of boilerplate.
- dfranke 19y agoUp to a point, avoiding whitespace does gain you something. It means you can fit more code on the screen at one time. In languages with C-like syntax, I've taken to putting consecutive close-braces on the same line, at the indentation level matching the outermost brace. It's surprising how much it helps.
- boucher 19y agoI disagree. The amount gained to having more on the screen is much less than what is lost to readability. Whitespace is your friend. I do exactly the opposite, where each bracket gets its own line, never going on the same line as code. This helps create an excellent visual division of blocks on the page.
- boucher 19y agoI completely disagree. Objective-C is an incredibly readable language precisely because it is verbose. Message parameters have labels, what a concept!