Linus' idea of "good taste" code

bluecat via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 25 17:19:34 PDT 2016


On Tuesday, 25 October 2016 at 22:53:54 UTC, Walter Bright wrote:
> It's a small bit, but the idea here is to eliminate if 
> conditionals where possible:
>
> https://medium.com/@bartobri/applying-the-linus-tarvolds-good-taste-coding-requirement-99749f37684a#.nhth1eo4e
>
> This is something we could all do better at. Making code a 
> straight path makes it easier to reason about and test.
>
> Eliminating loops is something D adds, and goes even further to 
> making code a straight line.
>
> One thing I've been trying to do lately when working with DMD 
> is to separate code that gathers information from code that 
> performs an action. (The former can then be made pure.) My code 
> traditionally has it all interleaved together.

Interesting, that's going in my tips.txt file. Quick question, if 
you don't mind. What would be the top three things you've learned 
that significantly made you a better programmer?


More information about the Digitalmars-d mailing list