From: hemant Date: 2008-02-29T02:59:42+09:00 Subject: Re: Proposed Solutions - Was [ Re: Monkeypatching is Destroying Ruby ] Hi Trans, On Thu, Feb 28, 2008 at 10:57 PM, Trans wrote: > I think there is deep misunderstanding about all this. The main issue > is really that Rails has added so many extensions to Ruby that > inexperienced Rails programmers follow suit and extend Ruby willy- > nilly. But that's not Ruby's problem. Ruby is an open "agile" language > --it lets you override almost any part of the system. Yes, that can be > "dangerous", but it can also be extremely powerful. It's up to the > programmer to consider their usecase and make the call. No amount of > preventative obstruction is going to make anything better, it will > only make life more difficult for those who use MP appropriately. I > personally think Ruby has too many meta-obstructions as it is. I > certainly don't want more. Rails has increased Ruby's mind share significantly and perhaps first time Ruby is being used to built applications that are really complex and large. For example, I do significant work in Ruby without Rails and my Rails project size is currently 71498 lines ( including plugins that I am using, but not the framework and not counting Javascript, rhtml,css,xml,yaml ). Too often, I have seen people blaming everything to Rails, but I do not think its true in this case. In the first link that I posted, whose fault it is? I have 103 gems installed on my machine, and not counting Rails libraries and facet , I still have around 5 or 6 of them, which are modifying core classes one way or the other. Trans, often on #ruby-lang I have heard from experienced rubyists why they avoid facet. I do not think, its a problem of rails. Ruby has grown and is being used by people with varying skills. I do not think, features that help people in avoiding these problems is bad. As a last note, I will leave you with this: http://blog.brightredglow.com/2008/1/17/evil-can-be-dangerous So, no its not specific to Rails. Its not a problem either, but we can do better. > > If we can come up with a real solution --eg. a good selector > namespaces design, then great. But short of that there is no point. > You can already do this: > > $ cat temp.rb > class String > def to_s; ""; end > end > > $ ruby -w temp.rb > temp.rb:2: warning: method redefined; discarding old to_s > > That ought to be preventive care enough. > > T. > > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org