From: Todd Gillespie Date: 2001-07-23T11:04:16+09:00 Subject: [ruby-talk:18312] Re: Ruby as opposed to Python? Mark Nenadov wrote: : Hello. I have toyed with the idea of trying Ruby out for some time now. : However, I have not found any major feature that puts it enough above Python. : Most of the differences I have come across (in "comparison with other : languages") seem to be pretty insignificant (minor differences) in terms of : selecting a language to use for major projects. It would behoove you to read the second half of Paul Graham's recent paper 'Beating the Averages', at http://www.paulgraham.com/avg.html. In a nutshell, programmers that have not understood a particular facility in a language are likely to treat it as unimportant, because they know how to think about programs using the idioms of the languages they already know, but not in these unfamiliar features. To quote: "As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub." To weigh in on the side of Ruby, I point out that it: 1. Is more fully OO, with a coherent approach to functions/methods/etc. 2. Is shockingly friendly with regards to blocks, closures, and iterators. 3. Ruby is far more capable of writing in functional style than Perl. Each of these strongly affects 'locality', meaning that using a language without these features entails structuring a given program in a substantially different fashion. To give an example of the locality concept, imagine trying to replicate object methods in a language without object support. For a more dramatic example, examine LISP macros. In a more cosmetic focus: 4. Scoping syntax is really cool. In an even less technical focus: 5. Creator has a good sense of humor. Downsides: -1: Ore wa nihongo ga heta desu. Totemo taihen. : Is there any sort of effort to port Ruby to the Palm's? Does the Ruby : community have any sort of mechanism for Enhancement Proposals (such as : PEP for Python)? This newsgroup, and associated mailing lists, are a good place to start. Always, visible, specific organizations are a method to a handle a flood of users. If we don't yet have an acryonym for 'ask Dave or matz', one might be thankful rather than bewildered. (I'm new here too, and very soon someone is going to tell me how wrong I am.) : The "comparison with other languages" states that "Ruby is "often faster : than Python". Is this documented anywhere? Could someone provide me with : some specific examples where Ruby would be faster than Python? If Ruby : was drastically faster than Python, that may be a good "selling point" in : my eyes. Someone else is going to jump in and tell us this-that-and-the-other about optimizers in Ruby & Python. I'll just reiterate a blunter point: compilers don't make fast code. Profilers do. 90% of CPU time is typically spent in a small portion of code; identifying and restructuring that delivers the big gains. Gaining another 10% by switching languages is often cost-ineffective compared to upgrading hardware. : In the interview with the Programming Ruby authors, they say "Ruby will : overtake Python within four years". On what basis do you supose they make : this claim? What is the most obvious driving force that they feel will : cause this change? I do not know the minds of Dave & Andrew, but were I to defend their stance, I would point out the mindshare of Ruby exceeds Python in Japan, where both languages have sufficient documentation to make a fair comparison, whereas in the States the rarity of Ruby docs has impaired such informed research. I would also put down my biz card, which reads 'Perl Programmer', and say that Python and Perl have almost no semantic distinctions, and both have been exhibiting core stagnation. Core language, mind you -- I am not contending the same of applications, which continue rapid progress; POE and some Python web tools leap to mind. But there is a great deal of indecision in perl-porters, and major difficulty in writing new enhancements. Larry Wall spoke on this exact point when explaining the goals of Perl6. There are many arguments in any number of directions, and predictions of the future are rarely accurate. I don't know why Dave & Andrew made the above contention, or why some of us are backing it up. Perhaps we're just drunk on the power Ruby has given us. : Anyways, I look forward to getting some mor information on these matters. HTH.