What's better about Ruby than Python?

Hung Jung Lu hungjunglu at yahoo.com
Fri Aug 22 16:39:20 EDT 2003


Alexander Schmolck <a.schmolck at gmx.net> wrote in message 
> 2. Redefining classes as part of an incremental development process. 
> ... 
> I'm chiefly interested in 2. 

This is something that I like about Python. Well, Python itself is not
100% perfect for interactive programming (what Alex has said about
session state), but it does have some interactive features like
dynamic module reloading, plus the weakref that you can use to update
class definition to all instances, etc. Not 100% interactive, but if
you tweak it enough, you can make it quite interactive.

We all know the problem of traditional programming languages and where
programmer waste their time:

(1) write some lines of codes
(2) compile
(3) restart the program, go through the process of setting up initial
state
(4) until you arrive at problem spot, find a bug
(5) go back to step (1)

Step (2), and especially (3), often take up too much time. Why do
programmers keep go back to restore the initial state manually? You'd
think after half a century of computer science people would have
figured out where programmers are wasting their time. But no, millions
of programmers keep doing the same tedious steps, over and over again.

Python is not perfect, but OK for interactive programming (not losing
session state, able to change program and class definition on the
flight) The other area where I see shortingcoming is
aspect-oriented-ish features. It's not Python's fault, though. All
other languages have the same problem. Currently we all write codes in
two-dimension, maybe in the future we will be able to write codes in
three dimensions. We are already seeing a bit of that with the
collapsable code regions in the IDEs. I can imagine that in the future
we could have code regions that are aspected-oriented-ish. And we will
indeed be writing codes in three dimensions. Well, kind of.

Hung Jung




More information about the Python-list mailing list