Marcin 'Qrczak' Kowalczyk wrote:
Bulat Ziganshin <[EMAIL PROTECTED]> writes:

that i want to say is what the first variant allows to define type of
'x' in such way that the only Show-specific operations are allowed,

Why?

Parametricity, what else? I'd much rather pass my precious String to a function of type [a] -> [a] or Functor a => a Char -> a Char than to a function of type String -> String. Restricting an interface is a very good thing from a program verification standpoint. It's much the same in object-oriented languages, except that the existence of dynamic downcasting kind of spoils things. But then, Haskell has undefined and unsafePerformIO.

-- Ben

_______________________________________________
Haskell-prime mailing list
[email protected]
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to