Wednesday, May 18, 2011

Paper of the day: Ad-hoc!!

Okay, I decided to go easy on the writing today because I'm trying to digest other papers. So, yeah, I decided to read and write about the classic paper How To Make Ad-hoc Polymorphism Less Ad-hoc. Well, there's not a ton of material to sink your teeth into these days, but I enjoyed reading it for the parts about explicitly translating typeclasses to dictionaries. What's neat to me is the idea that for the original proposal of typeclasses, this really did describe a suitable semantics that was entirely equivalent and you could think of overloading as syntactic sugar for dictionary building/passing. Haskell's typeclasses have evolved since then, and there's also the extensions my colleagues in Hasp have created for Habit, and I don't think that a simple dictionary translation within Haskell/Habit seems like it would be good enough to capture what qualified types really can do. Maybe I'm wrong about that? I suppose I haven't really tried to write down such a translation, but I'm not particularly hopeful about the endeavor.

A proper semantic framework for qualified types in general is something that's been bothering me for awhile, though I don't think it's a question I'll be answering but rather a fellow grad student in Hasp. I look forward to seeing what he comes up with (and mechanizing it...)

No comments:

Post a Comment