While everyone is saying what they want in Python :)

Erik Max Francis max at alcyone.com
Sun Feb 4 13:14:53 EST 2001


Jay O'Connor wrote:
> 
> Smalltalk-style cascade operations would be *very* cool
> 
> win = GtkWindow();
>         set_title("Hello World");
>         set_name ("window");
>         set_usize (400,200)
> 
> versus
> 
> win = GtkWindow()
> win.set_title("Hello World")
> win.set_name ("window")
> win.set_usize (400,200)

This general type of functionality (compare to the `with' keyword in
Pascal/Delphi) is generally a lot more trouble than it works.  It saves
a bit of typing, but sacrifices it for the sake of obscurity and
occasionally ambiguity when there are name collisions.

The amount of typing required should never be the primary concern in
desiging a language; clarity of what you're typing is much more
important than how many keys you physically have to hit.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ I never think of the future.  It comes soon enough.
\__/ Albert Einstein
    Official Buh rules / http://www.alcyone.com/max/projects/cards/buh/
 The official rules to the betting card game, Buh.



More information about the Python-list mailing list