On Dec 8, 7:31 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Dec 8, 2:26 pm, illume <[EMAIL PROTECTED]> wrote: > > > pygame is simpler to learn, since it doesn't require you to know how > > to create classes or functions. > > I'm not sure if I'd be quick to tout that as an advantage... :)
Hi, It's easier to teach only requiring *using* classes, and functions than *creating* them. This is important if it's being used to teach programming - as you don't need to teach people two fairly large concepts before you can do anything. People are motivated by seeing results. So it can be good to let people do things without requiring much learning. Anyone teaching object oriented program will tell you that it's a hard concept to present to people. So if you can avoid teaching parts of OO, and a bunch of other concepts at the same time, it's easier for people to handle. It's quite nice to be able to handle events without requiring callbacks. Everyone hates callbacks, but lots of people use them for event systems. However callbacks aren't needed at all for event programming. Instead you can get an event as an object and then process it. Callbacks for events made more sense in languages like smalltalk where events and method calls were closely aligned concepts(method calls are messages in smalltalk). However in languages where you don't have such a close conceptual alignment(such as python), making events objects instead of method calls is much easier to understand. Also python has very slow function calls, so avoiding using callbacks is also faster. Imagine using callbacks for files? So you would have to subclass file, and make a read_data method. Then your class will call your read data method when some data arrives. Kind of annoying, and not needed. </rant> -- http://mail.python.org/mailman/listinfo/python-list