by mahmud · 16y ago · 0 comments
if (condition) consequence();
You're able to "run" the condition in your head and step into the consequence without loss of pace. But when you put the consequence before the condition, you will have to backtrack. backtrack = true unless consequence.signifies? :block_end
It doesn't seem that much harder to read.To avoid excessive test coverage it would be more pragmatic to do:
backtrack = (consequence.signifies? :block_end) ? false : true
But that's not as easy to read :(A lot of software engineering lore crumbles into tautologies or is completely obviated when you're working at the microscopic level.