News for hackers. Stuff that matters.
Re:I'm Sick of This by blasdel on Wednesday April 08, 2009 @02:21PM (#553152)
Ruby, despite having 4? sigils as scoping operators, pervasively screws up or simply doesn't have support for scoping.

It really should have support for having class modifications scoped to your module (and accessible manually from outside), but I couldn't find it.

If the language is such that everything "should" be a method on the broadest-possible class, people are going to monkeypatch, because it feels "wrong" otherwise. People just want to write idiomatic code.

In Objective-C this ends up not being an issue, because there's very little usage of non-Apple libraries -- plus the default way of adding methods doesn't allow replacement, and Apple libraries are well-versioned (if you build your app for >10.4, API changes in 10.5 are invisible).

Re:I'm Sick of This by akkartik on Wednesday April 08, 2009 @06:49PM (#553556)
_why's done some work on this: http://github.com/why/potion/tree/master

     Scoped mixins. Basically, you can modify
     object behavior within a scope. So changes
     to core classes can be localized.
     ++ INCOMPLETE ++
Re:I'm Sick of This by hboon on Thursday April 09, 2009 @05:37AM (#554159)
Do you mean to say the default way of adding methods to existing Objective C classes can't replace existing methods? That's not true. I just hit it recently. Subtle bug.