>===== Original Message From merlyn / stonehenge.com (Randal L. Schwartz) ===== >>>>> "Jorg" == Jorg Ziefle <gt4556a / prism.gatech.edu> writes: [...] >I'm a very practical broad-based guy: I've got code or patches in >distros ranging from the GNU Emacs to Icon to the Squeak Smalltalk >codebase. About the only place that *doesn't* have code from me right >now is the Perl distro! (Although I helped design and advise some of >the Perl constructs.) You mean you FINALLY got chat2.pl killed? /duck >There are certainly some cool things in Ruby. Too bad Ruby isn't >about 3 years further along the cycle... it's gonna play catchup to >Perl forever for those that are comparing such things. Python suffers >similarly. There will be those who say so. There will also be those who say that there is value to a fresh start based on a cleaner design. The truth, as always, is somewhere between. >Jorg> P.s.: Do you think Perl6 can pick up some of the nice paradigms/idioms >Jorg> of Ruby and Pyton? There were even rumors that Perl6 will be able to >Jorg> interpret Ruby/Python scripts ... > >It's hard to say at the moment *what* Perl6 will be. My first guess >is that the delta between perl5 and the first release of perl6 will be >a proper subset of the RFCs submitted and presented to Larry Wall which >he is currently considering. (http://dev.perl.org/rfc/ if you're curious.) A proper subset? I hope not, I would be seriously disappointed if Larry doesn't come up with a few ideas of his own! (How about killing reset?) >There are certainly some features in there that would add to Perl some >of the features that Ruby has that Perl hasn't (yet). True. But there are features in Ruby that simply cannot be added to Perl because they are incompatible with Perl's design. On the short list of things I like are: - Things in Ruby know how to sort themselves and that choice is usually right. A Schwarzian sort is far cleaner in Ruby than it is in Perl. Beginners trying complex sorts in Perl usually drive themselves crazy. - Perl's tie is being done in Ruby - right. In Perl there is a basic syntactic wall between dealing with an object as an object and dealing with it as a drop-in replacement for a native data-type. Ruby's syntax makes this a non-issue. - Chained calls in Ruby are usually method calls. Therefore they consistently read left to right. By contrast Perl has a number of syntactic constructs that force the programmer to gyrate between going left and going right. As you know, I have been known to program in Perl, and I have a deep respect for the language. It is powerful and there is a tremendous wealth of goodies to help you be uncommonly productive. But the issues that I just labelled above are fundamental. They are not going away in Perl 6. As well with Perl there are random walls. Take for instance http://www.perlmonks.org/index.pl?node_id=66170. It was fun to write, I admit it. I will likely finish it off at some point. I learned something from doing it. But the problem is one that I would never have faced with Ruby. The default implementation of integers is both efficient and has no upper limits. Therefore write the methods to parse and spit out numbers in other bases and you are done. Less code. More functionality. Runs faster. What's not to like? Well Ruby is smaller and less mature. It is missing tools I consider basic in Perl. It won't be passing Perl in size, maturity, invented wheels, etc at any time soon. But if you are going to create a wheel, the process is probably going to be more pleasant in Ruby, and the language tends towards nicer designs than Perl. Cheers, Ben