[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what is the problem?




on ruby, regarding perl/python from the horse's mouth:

the following is from
http://www.oreillynet.com/pub/a/linux/2001/11/29/ruby.html

Stewart: Let's start with a little history. Why did you decide to 
write Ruby?

Matz: Back in 1993, I was talking with a colleague about scripting 
languages. I was pretty impressed by their power and their 
possibilities. I felt scripting was the way to go.
As a long time object-oriented programming fan, it seemed to me that 
OO programming was very suitable for scripting too. Then I looked 
around the Net. I found that Perl 5, which had not released yet, was 
going to implement OO features, but it was not really what I wanted. I 
gave up on Perl as an object-oriented scripting language.

Then I came across Python. It was an interpretive, object-oriented 
language. But I didn't feel like it was a "scripting" language. In 
addition, it was a hybrid language of procedural programming and 
object-oriented programming.

I wanted a scripting language that was more powerful than Perl, and 
more object-oriented than Python. That's why I decided to design my 
own language.

Stewart: I gather you had worked with both Perl and Python before 
creating Ruby. What bits of Perl did you incorporate in Ruby?

Matz: A lot. Ruby's class library is an object-oriented reorganization 
of Perl functionality--plus some Smalltalk and Lisp stuff. I used too 
much I guess. I shouldn't have inherited $_, $&, and the other, ugly 
style variables.

Stewart: How about Python? What aspects of that language did you try 
to reuse in Ruby?

Matz: Far less than Perl. But I stole a few things, like exception 
names. Plus I learned a lot from its code.

Stewart: Why should someone already familiar with Perl or Python 
switch to Ruby?

Matz: Why should you switch to Ruby? If you are happy with Perl or 
Python, you don't have to. But if you do feel there must be a better 
language, Ruby may be your language of choice. Learning a new language 
is harmless. It gives you new ideas and insights. You don't have to 
switch, just learn and try it. You may find yourself comfortable 
enough with Ruby to decide to switch to it.