
9 Mar
2007
9 Mar
'07
3:16 p.m.
On Fri, Mar 09, 2007 at 03:40:07PM +0000, Simon Peyton-Jones wrote:
Yes, Dynamic preceded the Typeable class, I think. Were we to do it today, I think we'd have
| data Dynamic = forall a . (Typeable a) => Dynamic a
Whether it's worth changing, I'm not sure. It's a library so, if a change desirable, anyone could take a lead.
I think data Dynamic where Dynamic :: a -> TypeRep -> Dynamic would be better, as it would cache the TypeRep for fast equality, while the 'Typeable' version would perhaps have to go through a dictionary lookup to get at it. John -- John Meacham - ⑆repetae.net⑆john⑈