Cool things about Ruby on the way out of Python?

Tim Peters tim_one at email.msn.com
Tue Feb 22 02:35:13 EST 2000


[Yukihiro "Matz" Matsumoto, Ruby's dad]
> Some points in Python which I don't like are too essential to remove
> from the language (e.g. block by indentation),

Ya, we all hate that <wink>.

> but I think the following can be solved in the future version
> (P3K maybe?).
>
>   * type, class distinction

Definitely to be fixed in P3K.

>   * statemant, expression distinction

I doubt Guido will ever want to blur this distinction -- Python discourages
"doing too much on one line" in many ways, although I don't know how
deliberate a design goal that was.  As is, most experienced Pythoneers will
even write

    if test:
        do_it

instead of

    if test: do_it

because the former is easier to read and easier to modify.  OTOH, Python may
grow more powerful kinds of expressions (e.g., list comprehensions are
widely regarded as natural for Python, and Greg Ewing already implemented a
version of them).

>   * restricted iteration by `for', using index and `__getitem__'

Many msgs about that here recently (generators, iterators, coroutines,
continuations).  Unclear whether any of that will happen, though.
Regardless, I agree Python's iteration protocol currently suffers in all but
the simplest of cases.


BTW, has Ruby developed its own version of "block by indentation" yet?  That
is, some feature you *really* like in Ruby that a minority of Ruby users (or
prospective Ruby users, or just random trolls) flame about endlessly?  If
so, I think Python would like to adopt all such features <0.9 wink>.

good-taste-is-offensive-ly y'rs  - tim






More information about the Python-list mailing list