Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

unless the consequence itself is something that signifies the end of a basic block, like a break or a next or a return.


  backtrack = true unless consequence.signifies? :block_end
It doesn't seem that much harder to read.


Unfortunately though you are potentially adding subtle bugs here which can only be caught at run time.

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 :(


I didn't reply to that one-liner because it is a one-liner.

A lot of software engineering lore crumbles into tautologies or is completely obviated when you're working at the microscopic level.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: