From: Ron M Date: 2005-10-29T03:08:55+09:00 Subject: Re: "Readability" inflation David A. Black wrote: > > ...a ton of suggestions for changing Ruby syntax.... > > That leaves me wondering why all these suggestions keep arising. > > I think what's happening is that people who've used Ruby for a while > get used to it, and then they sort of shift their readability I'm pretty sure it's the opposite of what you think. In the past, Ruby appealed to people who were fluent in Perl, ML, Lisp, Smalltalk, the K language, and a bunch of other languages with truly horrible readability problems. Judged against that field, Ruby is beautiful. Today Ruby is attracting people who may have more experience in C, VHDL and Fortran (me) or Visual Basic (like marketing departments for UI prototypes). > In other words, if you've seen this: > a.map {|b| b.meth } > > for several years, then even though it looked beautiful and concise > and transparent to you at first, it will start to look verbose and > syntactically inefficient. For us people with less broad exposure to esoteric languages, this: c.map{|b| b.meth} really isn't as intuitive as you'd think. If I were to ask people around the office, I'd expect guesses like these for "c.map{|b| b.meth}": ? It defines a function with the funny name "c.map" that takes no arguments; that pipes the variable b it's input to b and then to b.meth (like MSFT's Monad shell's pipe operator)? ? It uses "c" to return a hashtable ("map" sounds like HashMap in Java) with one element with name "b" and value "b.meth"? ? It takes the locations in the object "c" and plots the meth labs on the google-map "b"? In defense of "{|x| ...}", I really like it over C-style for loops. But readability for new users certainly isn't one of it's strengths. Consider Microsoft's Monad's get-childitem | sort-object extension | foreach { $_.filename} vs Ruby's get-childitem.sort_by{|child| child.extension}.map{|child| child.filename} Msh makes Ruby's 4-time repetition of "child" look quite tedious, without adding any readability that I can see over the Microsoft version. > So I think there's a kind of readability inflation going on: people > who are acclimatized to Ruby start feeling comfortable about going to > the "next" level of line-noise and/or compactness. I'd reiterate that I think it's the opposite. Newbies without the theoretical CS backgrounds are complaining about the parts that they find confusing or tedious. The one really great part about Ruby, though; is that almost any time someone complains, someone else posts some magical addition to some module that gives the complainer almost exactly what he wanted -- so I'd tend to agree the language shouldn't need many of these changes. But I think what's driving the increased requests are mostly things that people find hard to read, rather than clean things that people are getting bored with.