Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It feels like a common sentiment that concise code == good code


APL may be a counterexample, at least when trying to understand what you have written a few months later.


To be more precise, I would say that expressive code == good code


As long as expressive doesn't mean too terse and somewhat readable to most...lest you commit perl's sins.


Yeah. This was the point I was halfheartedly making -- concise code for the sake of concise code is a dogma that needs to go away.


Well, more to the point - bugs / LOC is remarkably constant in real code across coding languages, so one of the best things you can do is reduce LOC.


You're missing the fact that the constant factor differs between languages. The density (bugs per LOC) of memory handling bugs is much different in Rust than in C.



The link you gave confirms what I've said here.

> The quote is either wrong or outdated. In the second edition, it's on page 521: "Industry average experience is about 1 - 25 errors per 1000 lines of code for delivered software. The software has usually been developed using a hodgepodge of techniques.

1-25 is not a single number - it is a range.


Well: less code means less bugs doesn't it?


That's true, and Kotlin definitely leans into it, but extremely concise code basically ends up looking like Brainfuck -- lots of symbols jammed together and hard to read.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: