From: Will Conant Date: 2001-07-24T06:35:33+09:00 Subject: [ruby-talk:18390] RE: OO question Over the weekend, I put together my first real Perl project. Perl, of course, is not strictly object oriented... it's not strictly anything! During the course of the project, I found myself wanting to find out if a list contained some particular string... it took my 1.5 hours to definitively find out that there was no built-in way to do that... you just had to iterate through the list and check on your own. The reason it took me so long to figure it out was that, in perl, there isn't any natural place to put things. If there were to be a built-in mechanism for checking the contents of a list, where would it be, _what_ would it be? A function, an operator? In Ruby, there's only one reasonable place to look for Array functions... in the Array class. Sorry for the long-winded explanation, but the point is that Object-Oriented languages have a natural and consistent extension mechanism. Consequently, OO code is almost self-documenting. Purely OO languages like Ruby get the maximum benefit. Java, for the most part, has the same thing going for it... the only time it breaks down is when you have to go looking in the wrapper classes for functions that operate on primitives or when you have to use the .class syntax to refer to class objects. -Will Conant -----Original Message----- From: Tom Malone [mailto:tom@tom-malone.com] Sent: Monday, July 23, 2001 2:09 PM To: ruby-talk@ruby-lang.org Subject: [ruby-talk:18374] OO question Someone please tell me if this is an inappropriate question for this list - I don't want to irritate or offend anyone here. What is the benefit of a true object-oriented language (Ruby), in which everything is an object, as opposed to, say (arbitrarily) a language that is not strictly object-oriented (yet is still popular) like Java? Forgive the newbie his ignorance =) Tom