From: aks Date: 2008-04-03T02:00:25+09:00 Subject: Re: Is ruby is faster than all Object oriented Scripting langs On Mar 28, 9:40 pm, "M. Edward (Ed) Borasky" wrote: > Well ... I beg to differ. If you actually read _Beautiful Code_, you > will see beautiful code in many languages ... even Fortran, IIRC. The most beautiful piece of code, well.., it's a tie -- the two most beautiful pieces of code I ever saw were both in assembly language. The first, written in Univac 1108 assembler, performed a tree- traversal over an AVL tree. It was astoundingly compact and efficient. The second, written in PDP-11 assembler, implemented a pattern- matching algorithm that predated grep and regexps by several years which was used to translate English text into IPA phonemes, then translate IPA phonemes into Votrax phonemes, then translate Votrax phonemes into ASCII codes. The same code with three different tables of patterns. Efficient and beautiful. A close third was a one-liner in APL that inserted a new item into a doubly-linked list of them. But, to bring this post on topic, I have to agree with some of the others on this list that programming in Ruby makes me feel serenely calm, and sometimes, happy. I find programming in ruby natural and easy, once I made the jump over to the "everything is an object" camp. This feeling exceeds any similar feelings that may occasionally, and less frequently, occur when I program in sh, SQL, Perl, or Python. I like Python too, having written many thousands of lines of code in it. Closures are very cool - I use them all the time. The lack of explicit control structures is pretty, but the syntax causes occasional problems with long expressions that require continuations. And, I _still_ have to think a little bit when I do simple operations, like joining an array. Python got it backwards. The join method should have been an Array method, not a String method. The object to the join method should have been the array, not the delimiter. Ruby got this right: join is an Array method, split is a String method. Ruby should have had a closure expression, and kind of does if you consider Array::map {} The _only_ problem I have with Ruby is the comparable difficulty of finding and reading documentation from installed libraries. I have been a Perl programmer since version 1 and think Larry made the Right Choice when he integrated the Perl pods into the Unix "man" page infrastructure. How hard would it have been for Ruby and gem to publish their docs into the "man" pages? This would have been the most Unix-compatible way of sharing docs.