Linus' idea of "good taste" code

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 25 15:53:54 PDT 2016


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.


More information about the Digitalmars-d mailing list