On Wed, Jun 26, 2013 at 9:00 AM, Mark Janssen <dreamingforw...@gmail.com> wrote: >> 1) That breaks the Liskov Substitution Principle. A subclass of list >> ought to fulfill the contracts of a basic list. > > We don't need LSP. I write about this on the WIkiWikiWeb where there > were many arguments documented and many hairs frazzled. LSP was > derived from AlanKay's abstract idea of "Everything is an object". > But no -- there is a *physics* for information, and it ends at the > machine types.
Then you're talking about composition, not inheritance. We already have that - just declare a new type that consists only of other, simpler, types. That's the way class definitions work. (Okay, in Python it's a little different because everything's dynamic, but still there's a general concept that you're building the complex from the simple - a Point from a number of integers, a Shape2D from a number of points, etc.) >> This kinda violates the laws of >> information. Programmers, being creative entities, will be adding to >> the pool of knowledge. Trying to shoehorn everything into one object >> won't work. > > No, we don't need programmers adding to the "pool of knowledge" -- the > internet does that. We need programmers making data objects that can > present data in new and more interesting ways -- starting from basic > principles. The internet creates knowledge all on its own? Wow. The Singularity has been reached! No. Programmers add to code. That's what we get paid for. All those commits going onto source control aren't the creation of the internet. ChrisA -- http://mail.python.org/mailman/listinfo/python-list