From: Mike Gold Date: 2009-02-12T03:47:39+09:00 Subject: Re: Ruby vs Perl performance Igor Pirnovar wrote: > > I did not invent nor made up those rules, they are spelt out in Booch, > and nicely packed in design patterns. You can adhere to these rules in > any language even assembler, it only is much harder to do so in > procedural languages. Besides, it is not so much about following these > rules as understanding them. Your misplaced comments about most of the > details you are bringing up in this discussion and most noticeably about > encapsulation show a serious deficit in this area on your part. This is the most telling part of the voluminous stream of consciousness you've been piping to comp.lang.ruby lately. If you are committed to measuring everything in accordance with Booch, you will find a whole legion of sinners here. Indeed, that I and others keep wondering why you are not using Java or C++ makes sense in light of this. For the most part Ruby goes duck-typing route, which is fundamentally different than the route of Java or C++ patterns/methodologies you find in Booch. Ruby is like Lisp in this regard. The flexibility is there to allow a program to adapt to new information found only at runtime. A program is able to rewrite itself according to the situation. This is the essential power which made Lisp suitable for AI. It is impossible in Java or C++, unless you greenspun a half-ass lisp interpreter to do what you need (http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule). Take the example of delegation. There is no notion of Java-like interfaces or C++-like classes of just pure virtuals. In Ruby a delegate can have no relation, ancestry-wise, to the object it wraps. It violates all the Booch rules: it should be outlawed! Yet that's the Ruby way: create an object and "let it ride". Just start quacking and go. To hell with the indoctrination ceremonies which bestow permission to quack. Strange women lying in ponds distributing swords is no basis for a system of government! -- Posted via http://www.ruby-forum.com/.