On 5/21/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Something I've occasionally wondered about is just what it is that makes > operators so much more convenient than methods or builtin functions for some > operations.
Lambert Meertens, ABC's primary author, once explained this to me in a way that made sense to me. Some of the oldest operators (in the history of arithmetic/mathematics) are + and * (or whatever multiplication operator was first). These operators are associative: (a+b)+c == a+(b+c). There's also distributive law: a*(b+c) == a*b + a*c. And of course they are symmetric: a+b == b+a. Properties like that *visually* (at least this is Lambert's theory) help you see equivalences when doing mathematical proofs much easier than when you limit yourself to functional notations. (This might also explain why unary operators are relatively scarce; they don't have any of these properties so they don't buy you as much.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
