News for hackers. Stuff that matters.
Re:Functions Should Be Short And Sweet, But Why? by yummyfajitas on Wednesday January 22, 2014 @05:23AM (#7101823)
A single line function makes sense because it allows you to alter functionality later without worrying you forgot about some instance of that pattern:

    def logUnexpectedError(t: Throwable) = log.error("Oops: {}", t)
After I get it together and start keeping proper metrics:

    def logUnexpectedError(t: Throwable) = {
      log.error("Oops: {}", t)
      statistics.errorCounterByClass(t.getClass()).inc()
    }
Re:Functions Should Be Short And Sweet, But Why? by ufo on Wednesday January 22, 2014 @07:01AM (#7102084)
but on that opther hand, this means added complexity in all the cases where you dont overload it. Whoever reads the program will always have to keep overloading in mind.
Re:Functions Should Be Short And Sweet, But Why? by pedalpete on Wednesday January 22, 2014 @02:12PM (#7104675)
hence a good naming convention. If the function name is clear, than it shouldn't be a mind drain at all, particularly if it is only a one line function.