On 15/11/2012, at 1:06 PM, Dobes Vandermeer wrote: > Well consider a type class: > > class Widget[T] {virtual draw(w:T...) ;} ; > instance Widget [button] { draw(w:button...){...} } ; > > Wouldn't it be nice if you could do: > > val b = makeButton () ; > val w = b as Widget; > draw(w,...) ; > > The compiler can generate a record type with all the virtual functions of > Widget in it and an instance of Widget for that record type that delegates > each virtual method to the matching member function. Then you have some > syntax "x as Widget" to construct that record from any other type that has an > implementation of Widget available.
Yes, I understood that because I've had the same "desire" myself. What I don't understand is exactly what this means in a theoretical sense. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language