Named code blockes

Alex Martelli aleaxit at yahoo.com
Wed Apr 25 10:30:11 EDT 2001


"D-Man" <dsh8290 at rit.edu> wrote in message
news:mailman.988134756.29535.python-list at python.org...
    [snip]
> I think the registering of a callback is a nicer way of achieving the
> results, but that is just my preference.

Callbacks are fine, but in my view it's not a big nuisance for
the callback to be defined as an interface (perhaps with a
single method) using an inner class to implement it if need
be.  First-class callables are handy, sure, but IMHO their lack
is hardly a major issue with Java given interfaces and inner
classes.  (Personally, I find lack of mix-in multiple inheritance
a far larger inconvenience, requiring more workaround -- but
of course you won't find THAT complaint from people coming
from languages lacking multiple inheritance, Smalltalk &c...
if I had to add ONE boilerplate-reducing feature to Java, it
would be some way to get automatic delegation, though --
the ease of doing THAT in Python is such a major plus...!).


Alex






More information about the Python-list mailing list