Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.
John Bokma
john at castleamber.com
Thu Feb 18 18:50:29 EST 2010
John Bokma <john at castleamber.com> writes:
> Jonathan Gardner <jgardner at jonathangardner.net> writes:
>
>> On Feb 18, 8:15 am, Steve Howell <showel... at yahoo.com> wrote:
>>>
>>> def print_numbers()
>>> [1, 2, 3, 4, 5, 6].map { |n|
>>> [n * n, n * n * n]
>>> }.reject { |square, cube|
>>> square == 25 || cube == 64
>>> }.map { |square, cube|
>>> cube
>>> }.each { |n|
>>> puts n
>>> }
>>> end
>>>
>>
>> If this style of programming were useful, we would all be writing Lisp
>> today. As it turned out, Lisp is incredibly difficult to read and
>> understand, even for experienced Lispers. I am pleased that Python is
>> not following Lisp in that regard.
>>
>> for n in range(1,6):
>
> ^ should be 7
>
> But for the rest, I agree with you. I can read Steve's version, but even
> to an experienced Perl programmer that looks quite noisy :-)
Oh, wait, it's Ruby :-D.
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
More information about the Python-list
mailing list