Haskell record syntax
问题 Haskell's record syntax is considered by many to be a wart on an otherwise elegant language, on account of its ugly syntax and namespace pollution. On the other hand it's often more useful than the position based alternative. Instead of a declaration like this: data Foo = Foo { fooID :: Int, fooName :: String } deriving (Show) It seems to me that something along these lines would be more attractive: data Foo = Foo id :: Int name :: String deriving (Show) I'm sure there must be a good reason I