From: David Masover Date: 2009-02-13T07:26:11+09:00 Subject: Re: Ruby vs Perl performance Igor Pirnovar wrote: > (1) > -------------------- > David Masover wrote: > >> All objects respond to .nil?, and I'm surprised you made it this far in >> a discussion of Ruby without knowing about this. >> >> And, since classes are open, you can do this: >> >> class NilClass >> def nil? >> false >> end >> end >> >> Go ahead, type that into irb. Watch it crash on the very next command. >> > > I have told you are the master of sabotage. Why am I still feeding this troll? > Now tell me why on Earth > would one define things like { true==false } and { 2+2==5 }. For fun. But no, you wouldn't on a real project. Because despite what you seem to think, the fact that a language feature is there doesn't in any way imply that you have to use it. > I have more > trouble with Ruby crashing because of your sabotage! Oh, you mean you've actually defined things like (nil.nil? == false)? That's not very smart. > Much of what you are saying may be true > from your perspective, however, I simply do not have time to babble so > much. > And yet, obviously, you do, or we wouldn't have received this message. Something to think about before you reply. The only thing you don't seem to have time for is forming a logical argument. > I have also repeatedly praised Ruby's inherent duck-typing philosophy, > which ironically seems to be one of the strongest points my opponents > make, when they mindlessly and unjustly build it up as significant > Ruby's flaw. I don't think anyone's suggesting it's a flaw -- only that your philosophy would seem to make it one. For example, if duck typing is not a flaw, why should I not be able to borrow methods from unrelated classes? If the method works, clearly the two classes are of the same duck type. > The other point that I was arguing was that Ruby's > flexibility is not its fault but its strength, Ah. So when it's flexibility you like, it's a strength. When it's flexibility you don't like, it's "anarchy". Got it. > All these attributes do not > make Ruby a procedural language, > Ruby can, in fact, be used as an exceptionally good procedural language. >> 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! >> > > I could not disagree more. You are suggesting the rigidity that can only > be attributed to literary interpretation of the "scripture". It is in > fact Ruby's virtue that it did away with unnecessary virtuals and > abstract classes. Looks like you also don't understand sarcasm. > ------------------ > Chad Perrin wrote: > >> I'm not sure you're clear on the definition of "orthogonal". >> > > Logically in OOM the term loosely means "the opposite". I have never heard it used to mean that, in computer science or otherwise. It means, roughly, neither dependent nor mutually exclusive -- if two things are orthogonal, they have no side effects on each other. For example, object oriented programming is orthogonal to regular expressions. You can have a language with rich regex support and no OO, or, conversely, a language with rich OO and no builtin regex support. Or you can have a language with both -- in which case, you can probably make large changes to the object system without affecting regexes, and vice versa. Within an object system, I might call two modules "orthogonal" if I can include one, the other, neither, or both into my class without any problems -- and, specifically, if I can include both without one affecting the other. I believe Comparable and Enumerable are orthogonal in that way. Further reading: http://en.wikipedia.org/wiki/Orthogonality#Computer_science I think you'll probably find that you are the only person on this forum using "orthogonal" to mean "opposite", because it does not. In fact, you will not find "opposite" on that page -- despite wildly different definitions in each of the _eight_ fields mentioned. I wonder why you didn't simply say "opposite", if that's what you meant? Or were you just trying to sound smart by using big words?