Peter Verswyvelen <bugf...@gmail.com> wrote: > Haskell seems to have pretty strong support for dynamic casting using > Data.Typeable and Data.Dynamic. > All kinds of funky dynamic programming seems to be possible with these > "hacks". > > Is this considered as being as bad as - say - unsafePerformIO? What > kind of evil is lurking here? > Uncertainty. Noone on #haskell seems to know how Typeable-dispatches compare to pattern matching wrt. performance, and I was either too lazy or too uninterested to measure it myself. Combined with a custom type class and existentials, they safe you from writing catch-all ADTs and thus give code flexibility (and conciseness), while retaining static typing, modulo unexhaustive pattern warnings. This is how XHB uses Typeable, and, IMHO, it's a Good Thing.
-- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe