[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] Event-driven programming
I think that you may be confusing event-driven programming with the
subject/observer pattern. Event driven programming is "A kind of
program, such as a graphical user interface, with a main loop which just
waits for events to occur. Each event has an associated handler which is
passed the details of the event, e.g. mouse button 3 pressed at
position" (ref:
http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?event-driven). I may not be
understanding your approach, but I can't think of a program structure
where the main loop of the program sits idle and waits for events.
The subject-observer design pattern, which is described at
http://sern.ucalgary.ca/courses/SENG/609.04/W98/lamsh/observerLib.html
as well as in the classic "Gang of Four" Design Patterns book (Design
Patterns by Gamma, Helm, Johnson, and Vlissides) sounds closer to what
you are describing.
Tom
On Thu, 2004-01-15 at 17:14, Peter Drake wrote:
> Is anyone using event-driven programming for Go? (This is a variation
> on object-oriented programming where a message can be sent to many
> recipients and the sender doesn't have to know who they are.)
>
> The advantage, as I see it, is that various entities (pattern matchers,
> miai, groups, connections) can listen to only the board points that
> interest them. When a play is made, only the interested parties are
> updated.
>
> There are some interesting low-level programming challenges, and we'll
> also have to be careful to do just the right amount of propagation...
>
> Peter Drake
> Assistant Professor of Computer Science
> Lewis & Clark College
> http://www.lclark.edu/~drake/
>
> _______________________________________________
> computer-go mailing list
> computer-go@xxxxxxxxxxxxxxxxx
> http://computer-go.org/mailman/listinfo/computer-go
--
Thomas Johnson <thomas_johnson@xxxxxxxxxxxxxxxxx>
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go