News for hackers. Stuff that matters.
Re:Is Functional Abstraction Too Clever? by swombat on Saturday October 17, 2009 @09:37AM (#886913)
Functional abstraction in general is not too clever. This particular code example, though, absolutely is. As mechanical_fish pointed out, it's pretty much illegible.

DRY is only one of the principles of good code, and not the highest one. The highest one would be that the code must work. The second highest that the code must be clear to the reader.

I warmly recommend this excellent talk by Marcel Molina Jr at RubyConf 2007, about what makes code beautiful:

http://rubyconf2007.confreaks.com/d1t1p1_what_makes_code_bea...

He gives a good example of a case where using too many abstractions results in unclear, and hence ugly code.

Re:Is Functional Abstraction Too Clever? by weavejester on Saturday October 17, 2009 @04:15PM (#887370)
Huh? Why is it illegible?
Re:Is Functional Abstraction Too Clever? by jrockway on Saturday October 17, 2009 @04:43PM (#887402)
Because the reader doesn't know the language it's written in. Note that "illegible" is a property of the reader, in this case, not of the code itself.