TDNR without new operators or syntax changes
voldermort at hotmail.com
Sun May 22 08:38:20 UTC 2016
Henning Thielemann wrote
> I know people are unhappy with Haskell's records and module system, but I
> still think that's because these language features are not used properly.
> Type classes are the tool to write generic code and reduce combinatoric
> explosion of functions and modules are a way to collect functions per
> type. Following this principle you give function names that make sense
> together with the module name like File.write or Channel.write. Then there
> is no need for the compiler to disambiguate unqualified identifiers and
> you keep the type and the module issues separated.
The issue is with importing third-party modules, where you can't combine
them into sensible type classes without writing you own abstraction layer.
And in some cases, the similarities are in name only, so type classes
wouldn't work in any case.
View this message in context: http://haskell.1045720.n5.nabble.com/TDNR-without-new-operators-or-syntax-changes-tp5835927p5836376.html
Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.
More information about the Glasgow-haskell-users