MAY
1
2006
|
Fighting for the GoodAaron took on his asbestos suite and made a case for Python as a VisualBasic replacement for the free desktop. Ok, let's give him some fire and play the "my language is better than yours" game. Python is obviously the wrong choice. Ironically it's Aaron in his blog who eloquently tells us why this is the case. There are technical reasons, but there are also social reasons. If the creator of the language is perceived as a blocker to the future of the language there is obviously something wrong. But in the end it's even not the weaknesses of Python (I actually like the language and have gladly used it in the past), but the strength of the competition, and the strongest competitor is Ruby. It's just amazing what Ruby did in the last couple of months. It's gaining popularity extremely fast. Tim O'Reilly told us end of last year that Ruby book sales surpass Python. Many people are adopting Ruby and this is for a reason. I have used Ruby intensively during the last couple of months and I have to say it just feels right. KDE developers know that feeling. It's the same feeling you had when using Qt for the first time. It feels right, because when you look for something it's actually where you look first. It feels right because you frequently surprise yourself by writing code that works at once. It feels right because it's simple, elegant and still powerful. You see what Ruby can do for example in Ruby on Rails. Try it yourself. It's really fun to use and a big part of this is due to Rails making use of the dynamic nature of Ruby and putting it all into the right place. Other examples are the fantastic test framework, the extremely elegant XML builder (I once tried to build something similar in C++, but didn't came even close to the elegance of the Ruby solution) or Korundum, the Ruby bindings for KDE. For a VisualBasic replacement Ruby has all the necessary ingredients. So as I already stated in a previous blog: The future is Ruby, Ruby, Ruby. But in the end fighting about programming languages usually is as much fun as it is pointless. Deciding which language to use by committee is not going to work. Why do we have this multitude of languages, why are applications written in many different languages peacefully coexisting on each and every desktop out there? Because it actually makes sense to use the tool which fits the problem and which fits the person using the tool. Problems are different, people are different, so let them use the programming languages they chose. Of course there is a chance for every solution to become widely successfull and push away other solutions. It's hard to tell what it is which makes the difference between success and failure. If I would have to bet, I would put my money on Ruby.
|
![]() |
Comments
Perlisms take away from Ruby's potential
I like the pure object oriented ideal of Ruby, but the fact that it incorporates so many Perlisms in its syntax makes it hard to understand. Even Yukihiro Matsumoto, Ruby's creator, admits that the Perl baggage can make Ruby look cryptic:
Question: What bits of Perl did you incorporate in Ruby?
Answer: 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.
One of the reasons Perl lost popularity to Python was the fact that Python's syntax is much more straightforward.
Secondly, Python's (rather perfectionist) philosophy has been to provide one clear way of doing things, coined TOOWTDI. Not only does this make Python code portable between programmers who all know the same coding style, but it also cuts down dramatically on the need for tutorials that show all kinds of obscure ways to do things.
Finally, the fact that Google has chosen Python to do much of its internal development speaks wonders for the robustness of the language. And we all know that Google does things right ;-). In fact, Python's founder Guido van Rossum was hired by Google last year.
Re: Perlisms take away from Ruby's potential
One of the reasons Perl lost popularity to Python was the fact that Python's syntax is much more straightforward.
Ruby's syntax is very different from Perl, and much clearer. You don't have to use any '$_' stuff if you don't want, as there is usually more than one way to do things in Ruby. Ruby has a completely object oriented regular expression system, because in Ruby *everything* without exception is an object.
Whether you think TOOWTDI is a good thing or not is purely a matter of personal taste. I happen to prefer the Ruby approach, of having several different ways of doing things, or where the same method has different names so that people coming from different backgrounds will both find names they are familiar with. For example, Ruby has a method called 'collect', which is what it is called in Smalltalk, and a synonym of 'map', which is what it is called in Lisp.
But I think the languages have many more similarities to each other, compared with say a dumbed down systems programming language like Java.
This language debate is a SMOKE-screen for more important issues
I thinking everyone who thinks this issue is between which language is better to use is blowing a hell of a lot of SMOKE up his ass/has a lot of SMOKE in his head.
May I politely say, THATS NOT IT!!
What is important is coming up with a common binding/IDL for the linux community to standardize on. Then you can use whatever hell language you feel like. More importantly, if then you wrap your Ruby/Python/Smalltalk/javascript component with this magical IDL wrapper, you can then use that component in a language neutral way. That (I think) is why ActiveX (and COM and VB) is so popular. I think M$ stumbled across this concept by accident but they have certainly profited from it.
Now thats clear, how the heck do you specify an IDL for C/C++ which is fast, portable and easy to use??? (???CORBA anyone???) Maybe SMOKE's method for looking up method signatures is the way forward?
Cheers,
Ben
perception
Speaking as someone who uses Python a lot for the last few years, I've seen plenty of criticism of Python over that time. Some of it valid, some of it FUD, some of it just plain wrong. But I've never come across the idea that Guido is blocking the future development of the language. That is a new one to me.
As a matter of fact, the design for the next major upgrade to Python (read: it can break backwards compatibility), so called Python 3000, is being thrashed out now on the Python3k mailing list.
Yes. Thanks to Ruby on Rails, Ruby has enjoyed a lot of interest in the last year. (Some people might describe it as "hype", ;-) ) Mind you, every man and his dog has their own Rails inspired web framework based on their dynamic language of choice. Having a good web framework isn't the only criteria for selecting a programming language.
--
Simon