
Hello Claus, Monday, March 6, 2006, 4:30:04 PM, you wrote:
my own opinion is that this scheme is like classes - they can be resolved at compile time in most real cases but noone do it because code will be too large. if some function can accept any records which has field 'a' then to use this function on records of different types we need either to do specialization or use scheme with non-constant access time
CR> for those who haven't seen it, the following paper explored the former CR> possibility with good success (at a time when type classes where CR> still somewhat simpler:): CR> Dictionary-free Overloading by Partial Evaluation CR> Mark P. Jones, ACM SIGPLAN Workshop on Partial CR> Evaluation and Semantics-Based Program Manipulation, CR> Orlando, Florida, June 1994. CR> http://www.cse.ogi.edu/~mpj/pubs/pepm94.html 2-3 weeks ago i rolled in ghc-users list list of suggestions to improve ghc efficiency and make it close to C++. in particular, i proposed to make more aggressive compile-time specialization (at cost of less aggressive inlining of non-polymorphic functions) like the C++ templates common-used implementation. may be, i don't know something, but i think that in most cases we can end up with fully specialized code -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com