News for hackers. Stuff that matters.
Re:Clear is better than clever [pdf] by coldtea on Monday May 06, 2019 @09:41AM (#19839286)
>because chaining like this is a very common syntactic pattern in other people's code

If it's very common where you work, then run, don't walk, away...

Re:Clear is better than clever [pdf] by jlokier on Monday May 06, 2019 @10:13AM (#19839561)
No, it's very common in code people will encounter if they read a wide range of other people's code outside work.

If you haven't encountered it often enough that it's familiar, than I think you probably don't read much code outside a small bubble.

Re:Clear is better than clever [pdf] by ergothus on Monday May 06, 2019 @11:36AM (#19840350)
"readability" is largely a matter of familiarity, so it's very hard to make such sweeping statements accurately. The difference between "common idiom" and "unreadable mess" is "common", not the code itself.
Re:Clear is better than clever [pdf] by kdelok on Tuesday May 07, 2019 @08:49AM (#19848865)
Strongly agree with this. My company has its own coding standards and openly acknowledges that they are not objectively "the right way to do it", because such a thing does not exist. Instead, they define rules to make our code (relatively) safe and consistent.

The Linux kernel has another set of rules that differ in numerous ways (e.g. not wrapping single-line statements under a conditional in braces). Their rules are not strictly better or worse, just different and define their set of common idioms.

Another thing that the MD said to me during my interview was "code ought to be boring, testing can be interesting".