On Tue, 2006-12-05 at 20:12 +1100, skaller wrote: > > difference_type. Since we can't yet embed a type in a typeclass, I'm not > > sure how to model this.
BTW: there is a reason for maintaining this situation: currently, a typeclass instance *could* be represented by a 'vector' of functions, that is, a vtable. In other words, it could support first class, dynamically/late bound instances, and be passed explicitly as a pointer to that table. For that to work I think all the types must be parameters, since the vtable representation has no way, at the moment, to represent a type at run time. Typeclasses are fairly broken compared with Ocaml style module functors .. one of their advantages is the potential for an actual Object Oriented representation: it would be nice to keep hold of this for a while (even though a polymorphic implementation isn't on the cards at the moment). -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Felix-language mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/felix-language
