Re: Re: Extensible records in Haskell

Thanks, have read the paper, however also saw the paper by Simon Peyton-Jones and Mark Jones on Lightweight Extensible Records for Haskell, which I think Simon refered to in an earlier post... would it not be better to have this instead? Regards, Keean Schupke. Alastair Reid wrote:
Actually this raises an interesting point - As far as I can see you can do anything you can do with TRex, using a FiniteMap of Dynamic. How is TRex different from this? Is TRex just syntactic sugar for this kind of construct?
Read the paper (on Mark Jones publications page).
Trex is statically typed.
You could certainly get the effect of Haskell typeclasses using a FiniteMap of Dynamic to store methods (this isn't too far from what Smalltalk does) but it wouldn't be statically typed. Trex uses mechanisms close to those used to implement typeclasses to implement extensible records.
-- Alastair
participants (1)
-
Keean Schupke