a Python person's experience with Ruby

Colin J. Williams cjw at sympatico.ca
Sat Dec 8 10:29:16 EST 2007


MonkeeSage wrote:
> On Dec 7, 11:08 pm, Steve Howell <showel... at yahoo.com> wrote:
>> Python is my favorite programming language.  I've used
>> it as my primary language for about six years now,
>> including four years of using it full-time in my day
>> job.  Three months ago I decided to take a position
>> with a team that does a lot of things very well, but
>> they don't use Python.  We use Ruby instead.  I'd like
>> to share my observations about Ruby, because I think
>> they say important things about Python, which has been
>> my frame of reference.
>>
>> First of all, I actually enjoy programming in Ruby.
>> Although I'm still fairly early on the learning curve,
>> I feel like I've achieved basic fluency, and it
>> generally stays out of the way.
>>
>> (A quick disclaimer is that some of the observations I
>> make about Ruby may simply reflect my ignorance about
>> the language.  I'm still learning it.)
>>
>> The thing that I like least about Ruby is its
>> "require" mechanism.  Basically, when you do "require"
>> in Ruby, it sort of pollutes your namespace.  I much
>> prefer Python's explicitness.
>>
>> Some surprising things that I like about Ruby:
>>
>>   1) It has the Perlish natural language syntax of
>> "raise 'foo' if condition."  I never missed having
>> that syntax in Python, but now that I have it in Ruby,
>> I use it quite often.
This could be done in Python if raise 
became a function,
as it has for print.

Colin W.



More information about the Python-list mailing list