At 02:01 PM 1/8/2006 +1000, Nick Coghlan wrote: >Samuele Pedroni wrote: > > 2) > > http://homepages.cwi.nl/~ralf/OOHaskell/ > > state of the art experiment on trying to reconcile object orientation, > > type inference and as much as possible expressiveness > > > > PS: I think 1 is much more relevant than 2 for Python as we know it. > >I'd have to agree with that - I didn't actually make it all the way through >the second one, but an awful of lot of what I did read seemed to taken up >with >clever workarounds designed to trick the Haskell type inferencer into letting >the authors of the paper do some fairly basic things (like having a >heterogeneous collection of subtypes).
Yeah, I thought the second one was a really strong argument for *not* trying to transpose "traditional" OO code directly into Haskell, but rather focusing on polymorphic functions instead. In Python terms, functions like len() and copy() rather than focusing on building methods like __len__() and __copy__(). Since Haskell allows you to provide multiple definitions for a function based on matching types or values, there's really no point to trying to make actual methods. It seemed to me a lot like the whole "implicit self" argument; i.e., imposing a foreign paradigm on the language for familiarity's sake. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com