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

The benefit to refinements is in preventing code conflicts from a shared namespace (like monkeypatching a core class).

The downside is it becomes even _harder_ to figure out what code is being run just by reading it. Right now, you just have superclasses and included modules, potentially gummed up by method_missing. Now, you need to also pay attention to refinements included by code that _calls_ the code you're looking at, which may change the way it behaves.

Unless used with great care, it's going to create a nightmare debugging situation. And with some of the code I've seen, it'll happen.



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

Search: