Classes, OOP, Tkinter general comments and detailed questions...

Alex Martelli aleaxit at yahoo.com
Mon Apr 9 17:44:13 EDT 2001


"Alan Gauld" <alan.gauld at bt.com> wrote in message
news:3AD1DB5C.E75D0930 at bt.com...
    [snip]
> > Fortran in college (math and physics majors). Procedural programming
> > seems logical to me. Programs must follow the logic, and programs thus
> > can do only one thing.
>
> Sounds like the event driven nature of OOP/GUI work is what's
> really confusing you not OOP as such. Think of event driven
> as being like interriupt driven in assembler... an event
> arrives somewhat like a hardware interrupt and causes an
> event handler to fire - just like an intrrupt handler in
> assembler.

Hmmm -- not quite that bad, I would say: interrupts are particularly
pesky because they are asynchronous, and may arrive at any time,
_interrupting_ whatever you're doing -- so you must always be ready
for arbitrary interruptions except in small 'critical sections' that you
deliberately seal-off.  In event-driven processing, _you_ decide when
you're done with a (small) task and are ready to go back to waiting
for the next one -- that (in my experience) makes event-driven
processing nowhere as hard to learn, master _and_ use productively
as interrupt-driven programming (or even just free-threading and
parallel-programming styles); you are still thinking about ONE path
of execution, albeit split up into not-too-big chunks.


Alex






More information about the Python-list mailing list