News for hackers. Stuff that matters.
Re:I'm Sick of This by raganwald on Wednesday April 08, 2009 @11:59AM (#552882)
While I grouse about Rails, here is the challenge I posed last July at Rubyfringe: Forget about Rails providing all these extensions for Rails programmers to use. How does Rails perform this kind of metaprogramming for its own use? How can its own internal libraries use Array#sum while leaving Array unmodified for Rails programmers?
Re:I'm Sick of This by Locke on Wednesday April 08, 2009 @12:18PM (#552904)
In my own library, I use inject instead of adding Array#sum. But, I know that's sidestepping the issue, not solving it.

Honestly, I'm not sure how Rails uses #sum. I'm not sure whether they really need it or not. I suspect not.

I'm not a big fan of a lot of non-standard additions to Ruby. For example, all the #try, or #returning, or even your #andand. I don't consider any of those to have enough intrinsic value to be worth the risk of collisions with someone else's subtly different implementation.

Re:I'm Sick of This by raganwald on Wednesday April 08, 2009 @12:25PM (#552923)
I'm not a big fan of a lot of non-standard additions to Ruby. For example, all the #try, or #returning, or even your #andand. I don't consider any of those to have enough intrinsic value to be worth the risk of collisions with someone else's subtly different implementation.

#andand is soooooooo "raganwald." The Homoiconic Way is to use rewrite: #try, #returning, and #andand are all removed from your code and never conflict with other people's implementations ;-)