Linus' idea of "good taste" code
sarn via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 26 16:21:49 PDT 2016
On Wednesday, 26 October 2016 at 10:48:34 UTC, Marco Leise wrote:
> On a more controversial note, I sometimes replace nested blocks
> of conditionals and loops with flat spaghetti code and goto
> with verbose labels. There are situations where you can explain
> straight forward what needs to be done first, second and last,
> but special cases and loops make it hard to tell from "normal"
> code.
Speaking of Linus, that's idiomatic in the Linux kernel for error
handling.
I like using D's nested functions for simplifying code in the
same kind of way. Sometimes a tiny helper function can make a
big difference.
More information about the Digitalmars-d
mailing list