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

No, I mean that in the examples of difficult to parse lines there are no {} anywhere and no () on the condition.

  def save = File.write(name, self.to_yaml) unless invalid?
and you could also have

  def save = File.write(name, self.to_yaml) if valid?
If you had to bracket the expression that postfix if/unless applies to, it would be significantly easier to parse.


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

Search: