At 11:21 AM 5/10/2006 +0100, [EMAIL PROTECTED] wrote: >Have you taken a look at ConceptGCC? ( >http://www.osl.iu.edu/~dgregor/ConceptGCC/) > >It's basically a first cut at implementing the Concepts which will be >availiable in the next version of C++. They basically provide full compile >time "duck typing" as well as adaptation for types that don't exactly fit >the concept. (e.g if the type doesn't have a length method, here's how you >provide it. > >It's a very powerfull idea, and probably well worth looking at for >inspiration.
FWIW, I skimmed through the tutorial; it appears that a "Concept" is roughly equivalent to a typeclass in Haskell, and a "Model" is roughly equivalent to a typeclass instance. One of the papers on the site mentions something called "concept-based overloading", which if I'm reading it correctly, is the idea that's at the heart of this thread; i.e., it should be possible to say that a particular implementation of one operation is dependent upon the availability of an implementation of some other operation. _______________________________________________ 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
