From: Pat Maddox Date: 2006-12-05T07:03:45+09:00 Subject: Re: Question about Ruby philosophy On 12/4/06, Zouplaz wrote: > Hello, when I compare Ruby to Java there is something I don't understand . > > For example, let say that I create instances of JDBCFooBaseDriver in > Java - The methods and their behaviors will never change, unless I > update JDBCFooBaseDriver jar file. I can be sure that this part of my > environment will stay the same even if new third party libraries are > added and used by my application. > > Now, in Ruby I can use a new library (FancyDates) that will alter the > behavior of some JDBCFooBaseDriver methods - Some methods of > JDBCFooBaseDriver will be redefined by FancyDates and new methods will > be added - All this stuff will occurs without giving me a chance to be > informed of what is going on under the scene. Not really. Presumably if you're using a third-party library, you have a clue as to why you're using it. You've probably looked at the documentation, you definitely have access to the source. Not saying you should need to examine the source to use a lib, but basically you should at least read the documentation and stuff before blindly throwing it into a project. > So, > > 1) Is what I say right ? > 2) Why should I not be scared by that ? > 3) Why most C#, Java, C++ developper thinks that this approach is > dangerous and lead to bad practices ? There's potential for things to go wrong, I guess. Just like there's potential for mistakes in dynamic typing. Those opposed to dynamic typing will say stuff like, "Well what if someone calls refigerator.meow? It blows up at run time!" Those kinds of questions basically boil down to "What if I'm stupid?" Well, can't help you there... Basically, just give Ruby a shot for a while. Use it in a real project. If it doesn't work for you, drop it. Pat