From: William Djaja Tjokroaminata Date: 2002-09-04T04:02:54+09:00 Subject: Re: Ruby aesthetics Hi, I am too hoping that we will have this discussion in a friendly environment, as we are all Ruby lovers :) I used Perl before I used Python. The primary driving force behind the switch from Perl to Python is the special issue of "Linux Magazine" on Python (even until now I think the Linux Magazine editors are still Python supporters). They shared their experience on how wonderful the Python code was, and I tried it. And coming from some Perl background, it was! Compared to Perl, code and object model in Python are very clean. After programming years in free-form languages, I could really appreciate the advantages of indentation-based syntax. What finally turned me off was that in Python the object is modeled rather crudely using a hash (in Ruby also, but not as naked as in Python). For example, to access the object instance variable, the object method is defined as def f1 (self, x1, x2, ....) self.x1 = x1 .... This shows how crude the object model is in Python. (Well, in Ruby we don't see this until we code Ruby in C :) .) Then when I finally switched from Python to Ruby, I felt like I switched to "a (very much) better Perl" than to "a better Python". In other words, there is no question regarding comparison between Perl and Ruby; but Python and Perl, well, let's just say that the two are different :) ... Regarding whether Matz knew Python or not before he wrote Ruby, let's ask Matz... Regards, Bill ============================================================================ Hal E. Fulton wrote: > This is not a flame! :) > I think what you're saying is very interesting, because it's > almost the exact opposite of my opinion. > Disclaimer: I've never used Python. > I do think the idea of "significant indentation" is interesting, > but I would want the tab character to be illegal. (Yes, I know > the arguments in favor of tabs; let's not get into that one.) > It's bad enough mixing tabs and spaces in an ordinary language, > but in Python it seems like an additional inconvenience. >> I am still grieving that >> Ruby carries Perl's idiom of statement modifier >> >> ..... if/unless/while/until ..... > I like it. :) >> Also, in Ruby there are several method synonyms, such as Array >> "indexes" and "indices", which unnecessarily add more complications to the >> language. > I like these, too. :) >> I think these are several reasons why not all people migrated from Python >> to Ruby. (And of course we all know the superiority of Ruby to >> Python, right? :) ) I am just speculating, that, since Ruby was written >> after Python was introduced, if these two factors (among other >> things) have been taken into Ruby, probably Ruby had replaced Python to a >> great extent... > Is this true? Ruby was written after Python was introduced? > When was Python born? > Hal